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

expr: fix bugs and simplify ScalarExpr::reduce #2257

Merged
merged 2 commits into from Mar 9, 2020

Conversation

@benesch
Copy link
Member

benesch commented Mar 9, 2020

The simplifications here have the nice side effect of making it easier to plumb evaluation errors through reduce (#2234)—once evaluation can error, reduce has to be preserve those errors as it simplifies things.

@benesch benesch requested review from jamii and frankmcsherry Mar 9, 2020
Copy link
Member

frankmcsherry left a comment

These look good to me. Thanks very much!

benesch added 2 commits Mar 9, 2020
ScalarExpr::reduce could introduce typing errors when reducing calls to
BinaryFunc::MatchLikePattern or BinaryFunc::DateTrunc where the input
contained NULL. The resulting expression would type the NULL according
to the input type of the function, when the NULL needs to be typed
according to the output type of the function.

While I'm in here, teach all functions that propagate NULLs to do so
whenever *any* of their arguments is a literal NULL.
@benesch benesch force-pushed the benesch:type-aware-reduction branch from 291316a to 1dad382 Mar 9, 2020
@benesch benesch merged commit 9692a1b into MaterializeInc:master Mar 9, 2020
14 checks passed
14 checks passed
buildkite/tests Build #5800 passed (16 minutes, 53 seconds)
Details
buildkite/tests/bath-lint-and-rustfmt Passed (20 seconds)
Details
buildkite/tests/bulb-bulb-full-sql-logic-tests Passed (0 seconds)
Details
buildkite/tests/bulb-short-sql-logic-tests Passed (1 minute, 8 seconds)
Details
buildkite/tests/cargo-test Passed (46 seconds)
Details
buildkite/tests/docker-build Passed (13 minutes, 22 seconds)
Details
buildkite/tests/face-with-monocle-miri-test Passed (55 seconds)
Details
buildkite/tests/metabase-demo Passed (41 seconds)
Details
buildkite/tests/paperclip-clippy-and-doctests Passed (1 minute, 49 seconds)
Details
buildkite/tests/pipeline Passed (14 seconds)
Details
buildkite/tests/racing-car-testdrive Passed (3 minutes, 13 seconds)
Details
buildkite/tests/shower-streaming-demo Passed (26 seconds)
Details
license/cla Contributor License Agreement is signed.
Details
netlify/materializeinc/deploy-preview Deploy preview canceled.
Details
@benesch benesch deleted the benesch:type-aware-reduction branch Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.