findingrish commented on code in PR #16828:
URL: https://github.com/apache/druid/pull/16828#discussion_r1708760979


##########
processing/src/main/java/org/apache/druid/segment/AutoTypeColumnIndexer.java:
##########
@@ -405,8 +405,8 @@ public ColumnType getLogicalType()
       return ColumnType.NESTED_DATA;
     }
     if (isConstant && constantValue == null) {
-      // we didn't see anything, so we can be anything, so why not a string?
-      return ColumnType.STRING;
+      // we didn't see anything, so we can be anything, so be long as it is 
the most restrictive type
+      return ColumnType.LONG;

Review Comment:
   In the scenario when the ingestion spec doesn't have any custom dimensions, 
new incremental index is initialized with columns from previous index 
https://github.com/apache/druid/blob/master/server/src/main/java/org/apache/druid/segment/realtime/sink/Sink.java#L379,
 in that case it would probably be better to return the previous seen type? 



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