clintropolis commented on code in PR #19262:
URL: https://github.com/apache/druid/pull/19262#discussion_r3047559077
##########
processing/src/main/java/org/apache/druid/query/filter/FilterSegmentPruner.java:
##########
@@ -161,4 +166,14 @@ public String toString()
", virtualColumns=" + virtualColumns +
'}';
}
+
+ @Nullable
+ private VirtualColumn getQueryEquivalent(VirtualColumns shardVirtualColumns,
VirtualColumn shardVirtualColumn)
+ {
+ final Optional<VirtualColumn> cached =
shardEquivalenceCache.computeIfAbsent(
+ shardVirtualColumn,
Review Comment:
ah, good catch, no it isn't cool. Fixed by making the cache key be an
internal class to capture the tree structure so that it is the exact virtual
column structure and can't be tricked by the same names.
I'm kind of wondering if it would be worth making `VirtualColumns` store
virtual columns wrapped like this so that we can make operations like this a
bit cheaper, but I don't think i want to make a change like that in this PR.
Added some segments to the test that have the same names but different
json_value expression that failed before this fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]