Repository navigation
Conversation
|
Workflow [PR], commit [5356bba] Summary: ❌
|
| { | ||
| NameSet result; | ||
|
|
||
| for (const auto * output : dag.getOutputs()) |
There was a problem hiding this comment.
trackColumnsThroughDAG only follows explicit DAG outputs. FilterStep and many ExpressionSteps preserve untouched scan columns via updateHeader passthrough instead, so a lower pushed-down filter like a.group_id = 1 clears the tracked set here because filter_dag.getOutputs() only contains the boolean filter column.
Once that happens, the loop stops on tracked_columns.empty() before it reaches the higher filter above the JOIN, so the original hasAnyTokens(...) OR b... shape is still broken whenever part of the predicate was already pushed below the join.
Please preserve tracked names that survive as passthrough header columns too, not only aliases that appear in dag.getOutputs().
| bool hasIndexForColumn(const String & column_name) const { return header.has(column_name) || column_name == normalized_index_column_name; } | ||
| bool hasIndexForColumn(const String & column_name) const | ||
| { | ||
| String unqualified = stripJoinTableQualifier(column_name); |
There was a problem hiding this comment.
This only normalizes bare __tableN.col names. The post-JOIN text-index carriers for maps/JSON still arrive as mapValues(__table1.m), mapKeys(__table1.m), __table1.json.path, or __table1.map.key_<...>, and none of those forms are normalized before the later traverseFunctionNode / tryMatchNodeToJSONIndex checks.
That means hasAnyTokens(m['k'], ...) and hasAllTokens(json.a::String, ...) above a JOIN still skip tokenizer injection and can silently evaluate with the wrong tokenizer, even though the value is still read straight from the indexed table.
Build profile diff (arm_release)No arm_release build profile data for commit 5356bba - the build was skipped, reused from cache, or predates profile upload. |
|
Closed in favor of #116339 |
Closes: #115999
Related: #108808
Related: #113154
When combining an
ORwith a condition on the other table it is evaluated after theJOINand silently fell back tosplitByNonAlpha. Withtokenizer = arraythe index keepsalpha beta gammaas one token whilesplitByNonAlphasplits it into three, so matching rows disappeared.The tokenizer now also reaches predicates evaluated after a
JOIN, but only where the value is read straight from the indexed table.Reading the index directly stays restricted to predicates evaluated on the table itself: it yields a per-granule answer, meaningless once a
JOINhas reordered or duplicated rows. Previously it could reach past theJOINand fail the query with an exception.When nothing can be evaluated before the
JOIN, the index is never consulted for that table (force_data_skipping_indicesreportsINDEX_NOT_USED) and no tokenizer is available to supply.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed
hasAnyTokens,hasAllTokensandhasPhraseon a column with a non-defaulttextindex tokenizer silently returning wrong results when the predicate could not be pushed below aJOIN.Workflow [PR]
Sync PR [sync-upstream/pr/116197]