Skip to content

[GLUTEN-11749][VL] Throw exception if cannot get the pre-built hash table from ObjectStore correctly#11898

Open
JkSelf wants to merge 3 commits intoapache:mainfrom
JkSelf:bhj-exception
Open

[GLUTEN-11749][VL] Throw exception if cannot get the pre-built hash table from ObjectStore correctly#11898
JkSelf wants to merge 3 commits intoapache:mainfrom
JkSelf:bhj-exception

Conversation

@JkSelf
Copy link
Copy Markdown
Contributor

@JkSelf JkSelf commented Apr 9, 2026

What changes are proposed in this pull request?

When enabling HashTableBuildOncePerExecutor, we need use the pre-built hash table. If not, it should throw exception directly.

How was this patch tested?

Was this patch authored or co-authored using generative AI tooling?

Related issue: #11749

@JkSelf JkSelf changed the title [GLUTEN-11749][VL] Throw exception if not get the pre-built hash table [GLUTEN-11749][VL] Throw exception if cannot get the pre-built hash table from ObjectStore correctly Apr 9, 2026
<< "Error retrieving HashTable from ObjectStore: " << e.what()
<< ". Falling back to building new table. To ensure correct results, please verify that spark.gluten.velox.buildHashTableOncePerExecutor.enabled is set to false.";
opaqueSharedHashTable = nullptr;
if (isHashTableBuildOncePerExecutor) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you read the config from the member veloxCfg_ of SubstraitToVeloxPlan?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. Updated.


LOG(INFO) << "Successfully retrieved and aliased HashTable for reuse. ID: " << hashTableId;
} catch (const std::exception& e) {
LOG(ERROR)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LOG(ERROR) does not throw exception, if the config is false, please interrupt here. throw e. Could you not use try catch for normal execution path?

Copy link
Copy Markdown
Contributor Author

@JkSelf JkSelf Apr 9, 2026

Choose a reason for hiding this comment

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

When this configuration is enabled, the hash table must be retrieved from the ObjectStore. If retrieval fails, an exception should be thrown on the Gluten side rather than letting it propagate to the Velox side, consistent with the approach in PR #11749. If configuration is disabled, we already set opaqueSharedHashTable to null here and no need further process.

@github-actions github-actions bot added CORE works for Gluten Core VELOX labels Apr 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Run Gluten Clickhouse CI on x86

@github-actions github-actions bot removed the CORE works for Gluten Core label Apr 9, 2026
<< ". Falling back to building new table. To ensure correct results, please verify that spark.gluten.velox.buildHashTableOncePerExecutor.enabled is set to false.";
opaqueSharedHashTable = nullptr;
if (hashTableBuildOncePerExecutorEnabled) {
std::cout << "the hashTableBuildOncePerExecutorEnabled is set" << "\n";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you need the log?

" to false as workaround.");
}
} else {
std::cout << "the hashTableBuildOncePerExecutorEnabled is false" << "\n";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LOG(INFO)

@github-actions github-actions bot added the CORE works for Gluten Core label Apr 10, 2026
@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

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.

2 participants