kishoreg commented on a change in pull request #3728: Support for specifying 
Object Type in Schema
URL: https://github.com/apache/incubator-pinot/pull/3728#discussion_r249312324
 
 

 ##########
 File path: 
pinot-common/src/main/java/org/apache/pinot/common/data/FieldSpec.java
 ##########
 @@ -98,15 +102,21 @@ public FieldSpec(String name, DataType dataType, boolean 
isSingleValueField) {
   public FieldSpec(String name, DataType dataType, boolean isSingleValueField, 
@Nullable Object defaultNullValue) {
     this(name, dataType, isSingleValueField, DEFAULT_MAX_LENGTH, 
defaultNullValue);
   }
-
+  
   public FieldSpec(String name, DataType dataType, boolean isSingleValueField, 
int maxLength,
       @Nullable Object defaultNullValue) {
+    this(name, dataType, isSingleValueField, maxLength, defaultNullValue, 
null);
+  }
+  
+  public FieldSpec(String name, DataType dataType, boolean isSingleValueField, 
int maxLength,
 
 Review comment:
   yes, that was the initial solution. But wanted to keep the io layer (reader 
and writers) separate from the logical object layer. In other words, 
get<DataType> is supported by all the readers and writers.
   
   Also, there are too many switch(dataType) in the code which needs to handle 
various these DataTypes and only thing we can do there is handle them as string 
or bytes without much value.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to