Jackie-Jiang commented on code in PR #12115:
URL: https://github.com/apache/pinot/pull/12115#discussion_r1423208731


##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/partitioner/TableConfigPartitioner.java:
##########
@@ -41,6 +43,16 @@ public TableConfigPartitioner(String columnName, 
ColumnPartitionConfig columnPar
 
   @Override
   public String getPartition(GenericRow genericRow) {
-    return 
String.valueOf(_partitionFunction.getPartition(genericRow.getValue(_column)));
+    return 
String.valueOf(_partitionFunction.getPartition(convertToString(genericRow.getValue(_column))));
+  }
+
+  private static String convertToString(Object value) {

Review Comment:
   We can potentially check for all possible classes supported (e.g. Integer, 
Long, Float, Double, String etc.), but that might involve performance overhead 
(one if check per type). Since we don't add new data types frequently, I prefer 
keeping the check only for types that need to be converted



-- 
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: commits-unsubscr...@pinot.apache.org

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