gortiz commented on code in PR #11453:
URL: https://github.com/apache/pinot/pull/11453#discussion_r1308285165


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/DataSchema.java:
##########
@@ -334,9 +311,64 @@ public DataType toDataType() {
       }
     }
 
+    /**
+     * Converts to the internal representation of the value.
+     * <ul>
+     *   <li>BOOLEAN: boolean -> int</li>
+     *   <li>TIMESTAMP: Timestamp -> long</li>
+     *   <li>BYTES: byte[] -> ByteArray</li>
+     *   <li>BOOLEAN_ARRAY: boolean[] -> int[]</li>
+     *   <li>TIMESTAMP_ARRAY: Timestamp[] -> long[]</li>
+     * </ul>
+     */
+    public Object toInternal(Object value) {
+      switch (this) {
+        case BOOLEAN:
+          return ((boolean) value) ? 1 : 0;

Review Comment:
   It is not clear to my why do we use int as internal boolean value



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