Skip to content

GH: Gandiva: compare Configuration by value in the compiled-expressio… - #160

Open
lriggs wants to merge 1 commit into
dremio:dremio_27.0_23_19from
lriggs:gandiva-cache-key-config-equality
Open

lriggs wants to merge 1 commit into
dremio:dremio_27.0_23_19from
lriggs:gandiva-cache-key-config-equality

Conversation

@lriggs

@lriggs lriggs commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

…n cache key

ExpressionCacheKey::Hash() folds in configuration->Hash() by content, but operator== compared the configuration shared_ptr by identity. Two distinct Configuration instances with identical content therefore hashed equal yet compared unequal, so the compiled-expression cache missed and Gandiva recompiled an expression it had already built. Performance bug only (never a wrong result); impact scales with how often callers build fresh Configuration objects rather than sharing one.

Compare *configuration_ by value (Configuration::operator== already exists), with a null-safe guard. Adds TestExpressionCacheKeyConfigByValue.

@lriggs
lriggs force-pushed the gandiva-cache-key-config-equality branch from 7f3bf61 to c8864ff Compare November 14, 2026 01:06
…n cache key

ExpressionCacheKey::Hash() folds in configuration->Hash() by content, but
operator== compared the configuration shared_ptr by identity. Two distinct
Configuration instances with identical content therefore hashed equal yet
compared unequal, so the compiled-expression cache missed and Gandiva
recompiled an expression it had already built. Performance bug only (never a
wrong result); impact scales with how often callers build fresh Configuration
objects rather than sharing one.

Compare *configuration_ by value (Configuration::operator== already exists),
with a null-safe guard. Adds TestExpressionCacheKeyConfigByValue.
@lriggs
lriggs force-pushed the gandiva-cache-key-config-equality branch from c8864ff to 91c9db3 Compare November 14, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant