Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign uprelease-2.1: distsql: eagerly evaluate constant expressions #31091
Conversation
solongordon
requested a review
from
jordanlewis
Oct 8, 2018
solongordon
requested review from
cockroachdb/distsql-prs
as
code owners
Oct 8, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
solongordon
merged commit ad11a25
into
cockroachdb:release-2.1
Oct 8, 2018
solongordon
deleted the
solongordon:backport2.1-30216
branch
Oct 9, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
solongordon commentedOct 8, 2018
Backport 1/1 commits from #30216.
/cc @cockroachdb/release
exprHelper now normalizes its expression upon initialization. This
causes constant subexpressions to be evaluated up front, rather than re-
evaluating them every time
evalorevalFilteris called, and thusavoids a hefty per-row cost for expensive expressions. For example, the
SELECT query in the example below now returns in ~100ms rather than
~10s.
This also uncovered a bug in the normalizer where
NOT IN ()returnedfalse rather than true.
Fixes #30167
Release note: None