-
Notifications
You must be signed in to change notification settings - Fork 387
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
[#6196] feat(iceberg): adjust table distribution if creating table without specifying disribution mode #6214
Conversation
ac4876f
to
75c9027
Compare
75c9027
to
b6b71fb
Compare
@jerryshao @jerqi PTAL |
@@ -588,6 +596,16 @@ public void testConnection( | |||
} | |||
} | |||
|
|||
private static Distribution getIcebergDefaultDistribution( | |||
Boolean isSorted, Boolean isPartitioned) { |
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.
Boolean -> boolean
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.
updated
@@ -513,6 +514,13 @@ public Table createTable( | |||
.build()) | |||
.toArray(IcebergColumn[]::new); | |||
|
|||
// Gravitino NONE distribution means the client side doesn't specify distribution not the same |
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.
distribution not the -> distribution, which is not the same as none distribution in Iceberg.
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.
updated
@@ -513,6 +514,13 @@ public Table createTable( | |||
.build()) | |||
.toArray(IcebergColumn[]::new); | |||
|
|||
// Gravitino NONE distribution means the client side doesn't specify distribution, which is |
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.
Actually this isn't accurate for me. The unspecified distribution and unpartitioned should be different. But it may change more code. The fix may better than legacy implement. So I approve this.
…thout specifying disribution mode (#6214) ### What changes were proposed in this pull request? Adjust the distribution mode for creating Iceberg table with none distribution. the following is the Spark adjust logic, the flink is similar. ```java private DistributionMode defaultWriteDistributionMode() { if (table.sortOrder().isSorted()) { return RANGE; } else if (table.spec().isPartitioned()) { return HASH; } else { return NONE; } } ``` ### Why are the changes needed? Fix: #6196 ### Does this PR introduce _any_ user-facing change? Yes, add document ### How was this patch tested? add UT and IT
What changes were proposed in this pull request?
Adjust the distribution mode for creating Iceberg table with none distribution. the following is the Spark adjust logic, the flink is similar.
Why are the changes needed?
Fix: #6196
Does this PR introduce any user-facing change?
Yes, add document
How was this patch tested?
add UT and IT