[
https://issues.apache.org/jira/browse/BEAM-4621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17547260#comment-17547260
]
Kenneth Knowles commented on BEAM-4621:
---------------------------------------
This issue has been migrated to https://github.com/apache/beam/issues/19028
> Beam SQL operator side condition validation is sensitive to optimization
> ------------------------------------------------------------------------
>
> Key: BEAM-4621
> URL: https://issues.apache.org/jira/browse/BEAM-4621
> Project: Beam
> Issue Type: Bug
> Components: dsl-sql
> Reporter: Kenneth Knowles
> Priority: P3
>
> Beam SQL converts Calcite's operators to Beam SQL operators
> post-optimization, when the final rels are being converted to a pipeline.
> This means that the optimization process can obscure the ability to validate
> things easily.
> Specifically, for a {{CEIL(date TO DAY)}} we only support rounding to month
> or year (because of the underlying Calcite implementation. We want to be able
> to get the {{DAY}} and validate it before running. Today this is not
> validated properly because it is inconvenient.
> Before optimization, we can check that the second operand is a symbol and see
> what it is. After optimization, the conversion to Calc hides it behind a
> LocalRef. We could look up the LocalRef but it would be cleaner to avoid
> evaluation-like logic during type checking/validation phase.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)