clintropolis commented on code in PR #13777:
URL: https://github.com/apache/druid/pull/13777#discussion_r1105040084


##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/InformationSchema.java:
##########
@@ -73,44 +73,65 @@ public class InformationSchema extends AbstractSchema
   private static final String SCHEMATA_TABLE = "SCHEMATA";
   private static final String TABLES_TABLE = "TABLES";
   private static final String COLUMNS_TABLE = "COLUMNS";
-  private static final RowSignature SCHEMATA_SIGNATURE = RowSignature

Review Comment:
   >If we were to execute system tables queries with a Druid engine then the 
most obvious choice is to integrate SQL semantics into the Druid engine. That 
is, numeric types can be null. There may be historical reasons why numbers 
can't be null in Druid, but there are also good historical reasons why numeric 
types can be null in SQL.
   
   I think you misunderstood or I wasn't very articulate; numeric types can 
already be nullable in Druids native type system, we just have a mode, 
`druid.generic.useDefaultValueForNull=true`, in which numbers are never null 
and replaced with zeros. This is embedded in the conversion logic to allow the 
planner to optimize things when it knows things will never be nullable. The 
problem here is using that same conversion logic for tables that don't follow 
the rule.
   
   I guess the main thing I was trying to discuss here is that afaik there are 
still (non-immediate) plans to push all system tables down into the druid 
engine instead of using the fallback "bindable" engine, so that we have a 
consistent set of behavior and operators no matter what table you are querying, 
and at which point we would probably want these schemas to be expressed in 
Druid native type system for describing tables, (`RowSignature`), so I was 
wondering if that means we would just end up be changing these back at that 
point.
   
   I think its probably fine to make this change, git remembers, so we can 
always fetch these `RowSignatures` (and modify to use nullable numerics) from 
git history if/when we make the system tables some sort of native druid table 
and queries in the future.



-- 
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]

Reply via email to