Jackie-Jiang commented on code in PR #11661:
URL: https://github.com/apache/pinot/pull/11661#discussion_r1336209773
##########
pinot-core/src/test/java/org/apache/pinot/core/util/SchemaUtilsTest.java:
##########
@@ -161,6 +161,33 @@ public void testCompatibilityWithTableConfig() {
.addDateTime(TIME_COLUMN, DataType.LONG, "1:MILLISECONDS:EPOCH",
"1:HOURS")
.addSingleValueDimension("colA", DataType.STRING).build();
SchemaUtils.validate(schema, Lists.newArrayList(tableConfig));
+
+ schema = new Schema.SchemaBuilder().setSchemaName(TABLE_NAME)
+ .addMetric("double", DataType.DOUBLE, "NaN").build();
Review Comment:
(code format) Can you apply [Pinot
Style](https://docs.pinot.apache.org/developers/developers-and-contributors/code-setup#set-up-ide)
and reformat the changes?
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/SchemaUtils.java:
##########
@@ -157,6 +161,12 @@ public static void validate(Schema schema, boolean
isIgnoreCase) {
}
}
+ private static void validateDefaultIsNotNaN(FieldSpec fieldSpec) {
+
Preconditions.checkState(!fieldSpec.getDefaultNullValueString().equals("NaN"),
+ "NaN as null default value is not managed yet for %s",
+ fieldSpec);
Review Comment:
```suggestion
fieldSpec.getName());
```
--
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]