weixiangsun commented on a change in pull request #7781:
URL: https://github.com/apache/pinot/pull/7781#discussion_r751571702



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/query/selection/SelectionOperatorUtils.java
##########
@@ -339,6 +339,74 @@ public static DataTable 
getDataTableFromRows(Collection<Object[]> rows, DataSche
     return dataTableBuilder.build();
   }
 
+  /**
+   * The default value for each column type.
+   */
+  public static Serializable getDefaultValue(ColumnDataType dataType) {
+    switch (dataType) {
+      // Single-value column
+      case INT:
+        return THREAD_LOCAL_INT_FORMAT.get().format(((Number) 0).intValue());
+      case LONG:
+        return THREAD_LOCAL_LONG_FORMAT.get().format(((Number) 0).longValue());
+      case FLOAT:
+        return THREAD_LOCAL_FLOAT_FORMAT.get().format(((Number) 
0).floatValue());
+      case DOUBLE:
+        return THREAD_LOCAL_DOUBLE_FORMAT.get().format(((Number) 
0).doubleValue());

Review comment:
       Any comment?




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