Jackie-Jiang commented on a change in pull request #6409:
URL: https://github.com/apache/incubator-pinot/pull/6409#discussion_r557019187



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/segment/creator/impl/SegmentColumnarIndexCreator.java
##########
@@ -260,6 +274,19 @@ public void init(SegmentGeneratorConfig 
segmentCreationSpec, SegmentIndexCreatio
         _jsonIndexCreatorMap.put(columnName, jsonIndexCreator);
       }
 
+      H3IndexConfig h3IndexConfig = h3IndexConfigs.get(columnName);
+      if (h3IndexConfig != null) {
+        Preconditions
+            .checkState(fieldSpec.isSingleValueField(), "H3 index is currently 
only supported on single-value columns");
+        Preconditions.checkState(fieldSpec.getDataType() == DataType.BYTES,
+            "H3 index is currently only supported on BYTES columns");
+        H3IndexResolution resolution = h3IndexConfig.getResolution();
+        GeoSpatialIndexCreator h3IndexCreator =
+            segmentCreationSpec.isOnHeap() ? new 
OnHeapH3IndexCreator(_indexDir, columnName, resolution)

Review comment:
       When memory is not an issue (e.g. hadoop), on-heap creator is more 
efficient




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to