-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Refactor] Introduce ColumnId to support Column renaming (part3) #45757
base: main
Are you sure you want to change the base?
Conversation
@@ -267,7 +268,7 @@ protected void runPendingJob() throws AlterCancelException { | |||
.setShortKeyColumnCount(rollupShortKeyColumnCount) | |||
.setSchemaHash(rollupSchemaHash) | |||
.setStorageType(TStorageType.COLUMN) | |||
.setBloomFilterColumnNames(tbl.getCopiedBfColumns()) | |||
.setBloomFilterColumnNames(tbl.getBfPhysicalColumnNames()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does physical column name mean? should be columnID?
@@ -567,9 +568,13 @@ protected void runWaitingTxnJob() throws AlterCancelException { | |||
"found in the base table."); | |||
} | |||
} | |||
|
|||
List<ColumnId> usedPhysicalNames = new ArrayList<>(usedBaseTableColNames.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List<ColumnId> usedPhysicalNames = new ArrayList<>(usedBaseTableColNames.size()); | |
List<ColumnId> usedColumnIds = new ArrayList<>(usedBaseTableColNames.size()); |
public static FieldId create(String raw) { | ||
if (raw.contains("\\.")) { | ||
String[] fields = raw.split("\\.", 2); | ||
return new FieldId(ColumnId.create(fields[0]), fields[1]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this for?
4feb5ab
to
6d46d23
Compare
5e69af9
to
6336fff
Compare
Quality Gate passedIssues Measures |
[FE Incremental Coverage Report]✅ pass : 184 / 230 (80.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Why I'm doing:
We need a unique ID to identify the Column. This ID is used in all places that reference the Column. In this way, to change the attributes of the Column, such as name, we only need to change the attributes in the Column object. There is a uniqueId in the current Column, but it is only available in newly created tables. For compatibility reasons, we need to introduce another Id: ColumnID. The ColumnID of the historical table is the name of the column, because the name was previously immutable.
What I'm doing:
There are currently three ways to reference Column: 1: direct copy of Column object, 2: reference to Column name, 3: sql expression reference.
This PR changes the Column name to ColumnId reference.
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: