imply-cheddar commented on code in PR #12714:
URL: https://github.com/apache/druid/pull/12714#discussion_r910581064


##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java:
##########
@@ -172,7 +172,8 @@ public void reduce(
           // complex constant is not reducible, so just leave it as an 
expression
           literal = constExp;
         } else {
-          if (exprResult.isArray()) {
+          if (!exprResult.type().isPrimitive()) {
+            // just leave complex expresions alone
             // just leave array expressions on multi-value strings alone, 
we're going to push them down into a virtual
             // column selector anyway

Review Comment:
   It seems like the new comment line should actually be an edit to the 
existing comment line that explains that we are leaving all complex expressions 
alone.  With just adding the new line, the whole set of comments doesn't make 
sense to a reader that doesn't know the history of changes.



##########
processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndexAdapter.java:
##########
@@ -212,21 +217,22 @@ public IntIterator iterator()
     }
   }
 
-  @Override
-  public String getMetricType(String metric)
-  {
-    return index.getMetricType(metric);
-  }
-
-  @Override
-  public ColumnCapabilities getCapabilities(String column)
+  private static class DimensionAccessor
   {
-    return index.getColumnCapabilities(column);
-  }
+    private final IncrementalIndex.DimensionDesc dimensionDesc;
+    @Nullable
+    private final MutableBitmap[] invertedIndexes;
+    private final DimensionIndexer indexer;
 
-  @Override
-  public Metadata getMetadata()
-  {
-    return index.getMetadata();
+    public DimensionAccessor(IncrementalIndex.DimensionDesc dimensionDesc)
+    {
+      this.dimensionDesc = dimensionDesc;
+      this.indexer = dimensionDesc.getIndexer();
+      if (dimensionDesc.getCapabilities().hasBitmapIndexes()) {
+        this.invertedIndexes = new MutableBitmap[indexer.getCardinality() + 1];
+      } else {
+        this.invertedIndexes = null;
+      }
+    }

Review Comment:
   It took me a bit to realize this, but the changes in this class are all 
whitespace right?  I.e. code lines were moved, but nothing actually changed?



-- 
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]

Reply via email to