clintropolis commented on code in PR #12277:
URL: https://github.com/apache/druid/pull/12277#discussion_r980397268


##########
processing/src/main/java/org/apache/druid/segment/StringDimensionMergerV9.java:
##########
@@ -71,6 +76,15 @@ public StringDimensionMergerV9(
   )
   {
     super(dimensionName, indexSpec, segmentWriteOutMedium, capabilities, 
progress, closer);
+    if (capabilities.hasSpatialIndexes()) {
+      Preconditions.checkArgument(
+          
StringEncodingStrategy.UTF8.equals(indexSpec.getStringDictionaryEncoding().getType()),
+          StringUtils.format(
+              "Spatial indexes are incompatible with [%s] encoded 
dictionaries",
+              indexSpec.getStringDictionaryEncoding().getType()
+          )
+      );

Review Comment:
   ah I can probably fix this, the reason it currently isn't hooked up is 
because it requires the index writer to implement the 'get' method for spatial 
indexes building step, `StringDImensionMergerV9.mergeIndexes`, which is the 
only caller. 
   
   I haven't implemented it yet, currently the writer can only write, so it 
seemed easier to just put this check in for now. I can try to implement this 
method though so we can remove this limitation, either in this PR or a 
follow-up.



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