Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support add/drop field for struct column(part1) #46451

Merged
merged 7 commits into from
Jun 17, 2024

Conversation

sevev
Copy link
Contributor

@sevev sevev commented May 30, 2024

Why I'm doing:

It is the first pr to support add/drop field for struct column.

What I'm doing:

The main changes in this PR are two fold:

  1. Adding a unique ID to the fields in the struct column. Each field column can be uniquely identified by its name and ID.
  2. When creating a column reader for the struct column, the corresponding reader will be created for each field based on the provided column.

Fixes #46452

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

@wyb wyb requested review from wyb and luohaha June 7, 2024 02:09
Signed-off-by: zhangqiang <[email protected]>
Signed-off-by: zhangqiang <[email protected]>
Signed-off-by: zhangqiang <[email protected]>
@sevev sevev force-pushed the support_add_drop_field_part1 branch from b6bb230 to 7e5bc58 Compare June 12, 2024 01:57
be/src/storage/rowset/column_reader.h Outdated Show resolved Hide resolved
be/src/storage/rowset/column_reader.cpp Show resolved Hide resolved
be/src/storage/rowset/column_reader.cpp Show resolved Hide resolved
Signed-off-by: sevev <[email protected]>
wyb
wyb previously approved these changes Jun 13, 2024
Copy link

sonarcloud bot commented Jun 14, 2024

Copy link

[FE Incremental Coverage Report]

pass : 8 / 8 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/catalog/StructField.java 8 8 100.00% []

Copy link

[BE Incremental Coverage Report]

pass : 79 / 82 (96.34%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/storage/tablet_schema.h 5 6 83.33% [167]
🔵 be/src/storage/rowset/column_reader.cpp 64 66 96.97% [647, 648]
🔵 be/src/storage/rowset/column_reader.h 5 5 100.00% []
🔵 be/src/storage/rowset/segment.cpp 3 3 100.00% []
🔵 be/src/storage/metadata_util.cpp 2 2 100.00% []

@wyb wyb enabled auto-merge (squash) June 17, 2024 02:12
@wyb wyb merged commit 757f142 into StarRocks:main Jun 17, 2024
56 of 59 checks passed
@sevev
Copy link
Contributor Author

sevev commented Jun 17, 2024

@mergify backport branch-3.3

Copy link
Contributor

mergify bot commented Jun 17, 2024

backport branch-3.3

✅ Backports have been created

@sevev
Copy link
Contributor Author

sevev commented Jun 17, 2024

@mergify backport branch-3.2

Copy link
Contributor

mergify bot commented Jun 17, 2024

backport branch-3.2

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 17, 2024
Signed-off-by: zhangqiang <[email protected]>
Signed-off-by: sevev <[email protected]>
(cherry picked from commit 757f142)
mergify bot pushed a commit that referenced this pull request Jun 17, 2024
Signed-off-by: zhangqiang <[email protected]>
Signed-off-by: sevev <[email protected]>
(cherry picked from commit 757f142)

# Conflicts:
#	be/src/storage/rowset/column_reader.cpp
#	be/src/storage/rowset/column_reader.h
#	be/src/storage/rowset/segment.cpp
#	be/test/storage/rowset/flat_json_column_rw_test.cpp
#	be/test/storage/rowset/struct_column_rw_test.cpp
@sevev
Copy link
Contributor Author

sevev commented Jun 27, 2024

@mergify backport branch-3.2

Copy link
Contributor

mergify bot commented Jun 27, 2024

backport branch-3.2

✅ Backports have been created

wanpengfei-git pushed a commit that referenced this pull request Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Add/drop Field for struct column
7 participants