fix(native): Replace raw assert() with VELOX_CHECK in PrestoToVeloxConnectorUtils#27306
Merged
tanjialiang merged 2 commits intoprestodb:masterfrom Mar 11, 2026
Merged
Conversation
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideReplaces two raw C assert() calls in PrestoToVeloxConnectorUtils with always-enabled VELOX_CHECK_* macros and adds the required Velox exceptions header, ensuring invariants are enforced in release builds with better error messages. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
gggrace14
previously approved these changes
Mar 10, 2026
…tive-execution Summary: 3 production sites throw raw `std::invalid_argument`, which bypasses `VeloxToPrestoExceptionTranslator` and misclassifies user errors as `GENERIC_INTERNAL_ERROR`. Replace them with `VELOX_USER_FAIL` so they are properly translated to user-facing Presto error codes. Sites fixed: - `PrestoExchangeSource.cpp` - invalid task ID in remote split URL - `PrestoToVeloxExpr.cpp:131` - unexpected Block type - `PrestoToVeloxExpr.cpp:905` - unsupported RowExpression type Differential Revision: D96025465
tanjialiang
added a commit
to tanjialiang/presto
that referenced
this pull request
Mar 11, 2026
…restodb#27306) Summary: 2 raw C `assert()` calls are no-ops in release builds (NDEBUG), meaning these invariant checks silently disappear in production. Replace with `VELOX_CHECK_LE` and `VELOX_CHECK_GT` which are always active and provide better error messages on failure. Reviewed By: kewang1024 Differential Revision: D95995395
1d5c6f2 to
3998f68
Compare
…restodb#27306) Summary: Pull Request resolved: prestodb#27306 2 raw C `assert()` calls are no-ops in release builds (NDEBUG), meaning these invariant checks silently disappear in production. Replace with `VELOX_CHECK_LE` and `VELOX_CHECK_GT` which are always active and provide better error messages on failure. Reviewed By: kewang1024 Differential Revision: D95995395
3998f68 to
7ad50bb
Compare
gggrace14
approved these changes
Mar 11, 2026
This was referenced Mar 31, 2026
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
2 raw C
assert()calls are no-ops in release builds (NDEBUG), meaningthese invariant checks silently disappear in production. Replace with
VELOX_CHECK_LEandVELOX_CHECK_GTwhich are always active andprovide better error messages on failure.
Differential Revision: D95995395
Summary by Sourcery
Replace non-production C asserts in PrestoToVeloxConnectorUtils with always-on Velox checks to enforce integer range invariants at runtime.
Bug Fixes:
Enhancements: