jaykanakiya commented on code in PR #19704:
URL: https://github.com/apache/druid/pull/19704#discussion_r3781932950
##########
processing/src/main/java/org/apache/druid/query/filter/TypedInFilter.java:
##########
@@ -277,6 +279,27 @@ public RangeSet<String> getDimensionRangeSet(String
dimension)
return retSet;
}
+ @Nullable
+ @Override
+ public TypedValueSet getDimensionValueSet(String dimension)
+ {
+ if (!Objects.equals(getColumn(), dimension)) {
+ return null;
+ }
+ // Only LONG is safe (identical stringification on ingest and query);
DOUBLE/FLOAT are excluded and STRING is
+ // handled by getDimensionRangeSet.
+ if (!matchValueType.is(ValueType.LONG)) {
+ return null;
+ }
+ // sortedMatchValues is coerced to matchValueType, so Evals.asString
yields the same canonical strings as ingest.
+ // A null element is kept as a null set element so it matches a shard's
stamped null (missing value).
+ final Set<String> values = new HashSet<>();
+ for (Object value : sortedMatchValues.get()) {
+ values.add(Evals.asString(value));
Review Comment:
good catch, fixed by coercing before stringifying.
--
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]