gianm commented on code in PR #19711:
URL: https://github.com/apache/druid/pull/19711#discussion_r3642778163
##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidSqlValidator.java:
##########
@@ -536,20 +540,25 @@ private RelDataType validateTargetType(
// disable sealed mode validation if catalog validation is disabled.
final boolean isStrict = tableMetadata.isSealed();
+ // Base table layouts (which require 'sealed') may declare ingest-time
virtual columns; the columns those virtual
+ // columns consume are allowed in the source even though they are not
stored (e.g. a raw column feeding an
+ // expression that computes a stored clustering column).
+ final Set<String> baseTableVirtualColumnInputs =
getBaseTableVirtualColumnInputs(tableMetadata.baseTableMetadata());
Review Comment:
@clintropolis what do you think about this thread? Consider the test
`CalciteCatalogIngestionDmlTest#testInsertIntoBaseTableCatalogTable` which has
a similar scenario. I *think* that the `LOWER(b) AS tenant_lower` will be
ignored and `tenant_lower` will get stored as `null`. This doesn't seem right,
if so. The test doesn't include a result verification so it isn't checking what
happens. But, IMO, it should be a validation failure anyway.
--
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]