gianm commented on a change in pull request #11068:
URL: https://github.com/apache/druid/pull/11068#discussion_r608025694
##########
File path:
processing/src/main/java/org/apache/druid/segment/join/table/IndexedTableJoinable.java
##########
@@ -88,6 +90,42 @@ public JoinMatcher makeJoinMatcher(
);
}
+ @Override
+ public Optional<Set<String>> getNonNullColumnValuesIfAllUnique(final String
columnName, final int maxNumValues)
+ {
+ final int columnPosition = table.rowSignature().indexOf(columnName);
+
+ if (columnPosition < 0) {
+ return Optional.empty();
+ }
+
+ try (final IndexedTable.Reader reader =
table.columnReader(columnPosition)) {
+ // Sorted set to encourage "in" filters that result from this method to
do dictionary lookups in order.
+ // The hopes are that this will improve locality and therefore improve
performance.
+ final Set<String> allValues = new TreeSet<>();
+
+ for (int i = 0; i < table.numRows(); i++) {
+ final String s =
DimensionHandlerUtils.convertObjectToString(reader.read(i));
+
+ if (s != null) {
Review comment:
Ah, I think we should. I replaced it with
`NullHandling.isNullOrEquivalent(s)`.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]