amrishlal commented on a change in pull request #6719: URL: https://github.com/apache/incubator-pinot/pull/6719#discussion_r612097435
########## File path: pinot-common/src/main/java/org/apache/pinot/common/utils/PinotDataType.java ########## @@ -775,6 +969,18 @@ public static PinotDataType getPinotDataTypeForIngestion(FieldSpec fieldSpec) { return fieldSpec.isSingleValueField() ? PinotDataType.FLOAT : PinotDataType.FLOAT_ARRAY; case DOUBLE: return fieldSpec.isSingleValueField() ? PinotDataType.DOUBLE : PinotDataType.DOUBLE_ARRAY; + case BOOLEAN: + if (fieldSpec.isSingleValueField()) { + return PinotDataType.BOOLEAN; + } else { + throw new IllegalStateException("There is no multi-value type for BOOLEAN"); Review comment: Any specific reason why no multi-value support for BOOLEAN? Boolean is a primitive type just like Numerical types? ########## File path: pinot-common/src/main/java/org/apache/pinot/common/utils/PinotDataType.java ########## @@ -775,6 +969,18 @@ public static PinotDataType getPinotDataTypeForIngestion(FieldSpec fieldSpec) { return fieldSpec.isSingleValueField() ? PinotDataType.FLOAT : PinotDataType.FLOAT_ARRAY; case DOUBLE: return fieldSpec.isSingleValueField() ? PinotDataType.DOUBLE : PinotDataType.DOUBLE_ARRAY; + case BOOLEAN: + if (fieldSpec.isSingleValueField()) { + return PinotDataType.BOOLEAN; + } else { + throw new IllegalStateException("There is no multi-value type for BOOLEAN"); + } + case TIMESTAMP: + if (fieldSpec.isSingleValueField()) { + return PinotDataType.TIMESTAMP; + } else { + throw new IllegalStateException("There is no multi-value type for TIMESTAMP"); Review comment: Same with Timestamp, would like to see multi-valued support here as well unless there is a very specific reason not to do so? ########## File path: pinot-common/src/test/java/org/apache/pinot/common/data/DateTimeFormatSpecTest.java ########## @@ -82,6 +86,8 @@ public void testFromMillisToFormat(String format, long timeMs, String expectedFo entries.add(new Object[]{"1:MILLISECONDS:EPOCH", 1498892400000L, "1498892400000"}); entries.add(new Object[]{"1:HOURS:EPOCH", 0L, "0"}); entries.add(new Object[]{"5:MINUTES:EPOCH", 1498892400000L, "4996308"}); + entries.add(new Object[]{"1:MILLISECONDS:TIMESTAMP", Timestamp Review comment: Would be good to see a test case for `1:NANOSECONDS:TIMESTAMP` specially since Pinot supports `NANOSECONDS` and `java.sql.Timestamp` seems to require a separate call to `java.sql.Timestamp.setNanos(...)` to set nanoseconds in timestamp. -- 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. 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