Avoid create tables with system column names#878
Merged
Conversation
wuchong
reviewed
May 15, 2025
wuchong
left a comment
Member
There was a problem hiding this comment.
Thanks for the contribution @zhaomin1423 , the changes looks good in general. I left some minor comments.
| import static org.assertj.core.api.Assertions.assertThatThrownBy; | ||
|
|
||
| /** Test for {@link TableDescriptorValidation} . */ | ||
| public class TableDescriptorValidationTest { |
Member
There was a problem hiding this comment.
Could you add an integration test testCreateTableWithInvalidColumns in FlussAdminITCase? If the IT case is added, I think we don't need this unit test anymore.
…eDescriptorValidation.java Co-authored-by: Jark Wu <imjark@gmail.com>
MehulBatra
reviewed
May 16, 2025
|
|
||
| private static void checkSystemColumns(RowType schema) { | ||
| List<String> fieldNames = schema.getFieldNames(); | ||
| List<String> systemColumns = |
Contributor
There was a problem hiding this comment.
Can we create a set at the class level here? The list is going to grow, and it would help us to have a faster lookup via set and save us from recreating the same list on every function call.
@wuchong What do you think?
private static final Set<String> SYSTEM_COLUMNS = Collections.unmodifiableSet(
new HashSet<>(Arrays.asList(OFFSET_COLUMN_NAME, TIMESTAMP_COLUMN_NAME, BUCKET_COLUMN_NAME)));
Contributor
|
Thank you for your Contribution! left one comment remaining, looks good. |
wuchong
approved these changes
May 18, 2025
caozhen1937
pushed a commit
to caozhen1937/fluss
that referenced
this pull request
May 21, 2025
polyzos
pushed a commit
to polyzos/fluss
that referenced
this pull request
Jun 6, 2025
polyzos
pushed a commit
to polyzos/fluss
that referenced
this pull request
Jun 6, 2025
ZmmBigdata
pushed a commit
to ZmmBigdata/fluss
that referenced
this pull request
Jun 20, 2025
polyzos
pushed a commit
to polyzos/fluss
that referenced
this pull request
Aug 30, 2025
polyzos
pushed a commit
to HZY-Wade/fluss
that referenced
this pull request
Aug 31, 2025
Ugbot
pushed a commit
to Ugbot/fluss
that referenced
this pull request
Apr 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #810
Brief change log
Verify that the system columns are used.
Tests
API and Format
Documentation