You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/01/14 20:17:59 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #7792: Nicer error message if you have a typo in your schema file

Jackie-Jiang commented on a change in pull request #7792:
URL: https://github.com/apache/pinot/pull/7792#discussion_r785145603



##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/data/Schema.java
##########
@@ -188,6 +188,7 @@ public void addField(FieldSpec fieldSpec) {
     Preconditions.checkNotNull(columnName);
     Preconditions
         .checkState(!_fieldSpecMap.containsKey(columnName), "Field spec already exists for column: " + columnName);
+    Preconditions.checkArgument(fieldSpec.getDataType() != null, "'%s' field is missing 'dataType' property", columnName);

Review comment:
       This line is too long, and breaks the linter check

##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/data/Schema.java
##########
@@ -213,6 +214,7 @@ public void addField(FieldSpec fieldSpec) {
         throw new UnsupportedOperationException("Unsupported field type: " + fieldType);
     }
 
+

Review comment:
       (minor) redundant empty line

##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/data/Schema.java
##########
@@ -188,6 +188,7 @@ public void addField(FieldSpec fieldSpec) {
     Preconditions.checkNotNull(columnName);

Review comment:
       We may add some exception message if name is not specified




-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org