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: [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]