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

Lazily throw exception in simple functions initialize() #1957

Closed
wants to merge 2 commits into from

Conversation

pedroerp
Copy link
Contributor

@pedroerp pedroerp commented Jul 6, 2022

Summary:
Lazily throwing exceptions in simple functions initialize().

If the initialize() method provided by simple functions throw, we can't let the
exception bubble up immediately; rather, we need to capture the exception and
only throw it if there are any active rows.
.
Consider the function "f(p1, c1)" where c1 is a constant that makes f()
throw on initialize(). If we throw immediately on initialize() and p1 is
composed only of nulls, the expected behavior would be to optimize this
function out and return null, not to throw. This subtle semantic issue
has been reported by Fuzzer runs.

Differential Revision: D37666610

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jul 6, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D37666610

Connor Devlin and others added 2 commits July 6, 2022 22:23
Differential Revision:
D37259813

Registered format_datetime function, updated format_datetime implementation, began format_datetime tests
D37259811

fbshipit-source-id: f6fd15bd87cc608803bc836fdd958c9053840de3
…bator#1957)

Summary:
Pull Request resolved: facebookincubator#1957

Lazily throwing exceptions in simple functions initialize().

If the initialize() method provided by simple functions throw, we can't let the
exception bubble up immediately; rather, we need to capture the exception and
only throw it if there are any active rows.
.
Consider the function "f(p1, c1)" where c1 is a constant that makes f()
throw on initialize(). If we throw immediately on initialize() and p1 is
composed only of nulls, the expected behavior would be to optimize this
function out and return null, not to throw. This subtle semantic issue
has been reported by Fuzzer runs.

Reviewed By: kevinwilfong

Differential Revision: D37666610

fbshipit-source-id: eedcdcae2bb394342752021bce514657dc9b894b
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D37666610

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. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants