Skip to content

Conversation

beliefer
Copy link
Contributor

@beliefer beliefer commented Aug 4, 2025

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

@github-actions github-actions bot added CORE works for Gluten Core VELOX labels Aug 4, 2025
Copy link

github-actions bot commented Aug 4, 2025

#10349

Copy link

github-actions bot commented Aug 4, 2025

Run Gluten ClickHouse CI on ARM

Copy link

github-actions bot commented Aug 4, 2025

Run Gluten ClickHouse CI on ARM

Copy link

github-actions bot commented Aug 4, 2025

Run Gluten ClickHouse CI on ARM

Copy link

github-actions bot commented Aug 4, 2025

Run Gluten ClickHouse CI on ARM

Copy link

github-actions bot commented Aug 4, 2025

Run Gluten ClickHouse CI on ARM

Copy link

github-actions bot commented Aug 4, 2025

Run Gluten ClickHouse CI on ARM

@FelixYBW FelixYBW requested a review from marin-ma August 4, 2025 18:29
@beliefer
Copy link
Contributor Author

beliefer commented Aug 6, 2025

ping @marin-ma

@beliefer
Copy link
Contributor Author

beliefer commented Aug 7, 2025

@marin-ma
Copy link
Contributor

marin-ma commented Aug 7, 2025

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)) {
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@zml1206 zml1206 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zml1206 zml1206 merged commit 59a473c into apache:main Aug 13, 2025
93 of 94 checks passed
@beliefer
Copy link
Contributor Author

@zml1206 @marin-ma @FelixYBW Thank you all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CORE works for Gluten Core VELOX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove the unnecessary Set and use enum directly.
3 participants