[
https://issues.apache.org/jira/browse/CALCITE-7603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Budiu resolved CALCITE-7603.
----------------------------------
Fix Version/s: 1.43.0
Assignee: Mihai Budiu
Resolution: Fixed
In the end I have used a syntax which is closest to the existing syntax:
ROW(expr AS name).
Fixed in
[https://github.com/apache/calcite/commit/8888eab229873dc2bf48f346e25bc0a2744eda93]
Thank you for your review [~jensen]
> Support ROW constructors that name fields
> -----------------------------------------
>
> Key: CALCITE-7603
> URL: https://issues.apache.org/jira/browse/CALCITE-7603
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.42.0
> Reporter: Mihai Budiu
> Assignee: Mihai Budiu
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.43.0
>
>
> Trino apparently supports the following syntax:
> {code:java}
> ROW(a => 1, b => 2) {code}
> This seems like a very useful feature to have. Today the Calcite ROW
> constructor builds a ROW type with compiler-generated field names. This would
> also help resolve CALCITE-7602
> Alternative syntaxes are possible. BigQuery has an alternative
> {code:java}
> STRUCT(1 AS a) {code}
> (BigQuery uses STRUCT instead of ROW)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)