shenyu0127 commented on code in PR #10423:
URL: https://github.com/apache/pinot/pull/10423#discussion_r1247131077


##########
pinot-query-planner/src/main/java/org/apache/pinot/query/catalog/PinotCatalog.java:
##########
@@ -127,4 +128,20 @@ public boolean isMutable() {
   public Schema snapshot(SchemaVersion version) {
     return this;
   }
+
+  private static boolean isNullEnabled(TableCache tableCache, String 
rawTableName) {

Review Comment:
   This function gets a table property. Other similar functions are member 
functions. Do we want change this function to a member function for consistency?



##########
pinot-query-planner/src/main/java/org/apache/pinot/query/type/TypeFactory.java:
##########
@@ -43,43 +43,44 @@ public TypeFactory(RelDataTypeSystem typeSystem) {
     super(typeSystem);
   }
 
-  public RelDataType createRelDataTypeFromSchema(Schema schema) {
+  public RelDataType createRelDataTypeFromSchema(Schema schema, boolean 
isNullSupportEnabled) {
     Builder builder = new Builder(this);
     for (Map.Entry<String, FieldSpec> e : schema.getFieldSpecMap().entrySet()) 
{
-      builder.add(e.getKey(), toRelDataType(e.getValue()));
+      builder.add(e.getKey(), toRelDataType(e.getValue(),
+          isNullSupportEnabled || e.getValue().isNullableField()));

Review Comment:
   What about a fallback mechanism to determine nullability? 
   
   - A column level nullability can be true, false, or NULL(default).
   - A table level nullability can be true or false (default)
   - If the column level nullability is present, it determines the nullability.
   - If the column level nullability is not present, we fall back to the table 
level nullability setting.



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

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

Reply via email to