You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "rongrong (via GitHub)" <gi...@apache.org> on 2025/06/24 23:24:24 UTC
Re: [PR] [CALCITE-6770] Preserve column names when casts are inserted in projects [calcite]
rongrong commented on PR #4130:
URL: https://github.com/apache/calcite/pull/4130#issuecomment-3002143261
This actually breaks the following SQL:
```
SELECT
CASE
WHEN ID IS NOT NULL
THEN foo
ELSE CAST(ID AS VARCHAR)
END AS ID
FROM testTable;
```
because it would rewrite the THEN clause to `THEN CAST(foo AS VARCHAR) AS foo` which is no longer valid SQL. Not all places accept identifiers accept alias.
--
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-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org