-
Notifications
You must be signed in to change notification settings - Fork 575
[GLUTEN-10349] Remove the unnecessary Set and use enum directly #10350
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
Conversation
Run Gluten ClickHouse CI on ARM |
Run Gluten ClickHouse CI on ARM |
Run Gluten ClickHouse CI on ARM |
Run Gluten ClickHouse CI on ARM |
Run Gluten ClickHouse CI on ARM |
Run Gluten ClickHouse CI on ARM |
ping @marin-ma |
LGTM. @zhztheplayer Could you take a look? Thanks! |
@@ -193,7 +192,7 @@ protected void writeImpl(Iterator<Product2<K, V>> records) { | |||
new Spiller() { | |||
@Override | |||
public long spill(MemoryTarget self, Spiller.Phase phase, long size) { | |||
if (!Spillers.PHASE_SET_SPILL_ONLY.contains(phase)) { | |||
if (!Spiller.Phase.SPILL.equals(phase)) { |
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.
Nit: Can you unify the code style? Same as above, using pattern matching, thanks
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.
@@ -87,7 +86,7 @@ public ColumnarBatchOutIterator createKernelWithBatchIterator( | |||
new Spiller() { | |||
@Override | |||
public long spill(MemoryTarget self, Spiller.Phase phase, long size) { | |||
if (!Spillers.PHASE_SET_SPILL_ONLY.contains(phase)) { | |||
if (!Spiller.Phase.SPILL.equals(phase)) { | |||
return 0L; |
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.
ditto
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.
Java style recommends if
if there is only one branch.
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.
Oh, these two are java classes.
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.
LGTM
What changes were proposed in this pull request?
This PR proposes remove the unnecessary
Set
and use enum directly(Fixes: #10349)
How was this patch tested?
unit tests, integration tests, manual tests