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


##########
processing/src/main/java/org/apache/druid/segment/AutoTypeColumnIndexer.java:
##########
@@ -282,6 +282,10 @@ public ColumnCapabilities getColumnCapabilities()
 
   private ColumnType getLogicalType()
   {
+    if (fieldIndexers.isEmpty()) {
+      // we didn't see anything, so we can be anything, so why not a string?
+      return ColumnType.STRING;

Review Comment:
   Stream of conciousness: I wonder if we need a `ColumnType.NULL` to indicate 
something that can become anything else, but will always be null?



##########
processing/src/test/java/org/apache/druid/segment/TestHelper.java:
##########
@@ -484,6 +484,17 @@ public static Map<String, Object> makeMap(boolean 
explicitNulls, Object... vals)
     return theVals;
   }
 
+  public static Map<String, Object> makeMapWithExplicitNull(Object... vals)

Review Comment:
   My guess: the JVM doesn't like to statically put `null` into an Object[].  
You can try, perhaps calling `makeMap(true, new Object[]{1234L, "x", null}...)`
   
   Or this is fine too.



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