Skip to content
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

feat: Handle errors during constant folding in expression compilation #12376

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pramodsatya
Copy link
Collaborator

Expression compilation currently ignores any errors encountered during constant folding. This change enables the expression compiler to return a FailFunction in place of the constant expression which throws a VeloxException when evaluated. This is consistent with the behavior of Presto's expression compiler, please see this issue for more context.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 18, 2025
Copy link

netlify bot commented Feb 18, 2025

Deploy Preview for meta-velox ready!

Name Link
🔨 Latest commit dc758a5
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/67b4e6b4009f4b0008777ce7
😎 Deploy Preview https://deploy-preview-12376--meta-velox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -1753,9 +1753,11 @@ std::vector<common::Subfield> Expr::extractSubfields() const {
ExprSet::ExprSet(
const std::vector<core::TypedExprPtr>& sources,
core::ExecCtx* execCtx,
bool enableConstantFolding)
bool enableConstantFolding,
bool ignoreConstantFoldError)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@pramodsatya : Maybe say 'constantFoldErrorWithFailFunction' instead to make the config more clear about what it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants