[ 
https://issues.apache.org/jira/browse/CALCITE-5696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18124254#comment-18124254
 ] 

Yu Xu edited comment on CALCITE-5696 at 10/7/26 4:21 AM:
---------------------------------------------------------

Indeed, some newer engines support this syntax. Besides BigQuery, I also found 
that DuckDB supports it as follow:

memory D select * from aa;
┌───────┬─────────┐
│  id   │  name   │
│ int32 │ varchar │
├───────┼─────────┤
│ 1     │ aa      │
│ 2     │ bb      │
└───────┴─────────┘
memory D select id,name, from aa;
┌───────┬─────────┐
│  id   │  name   │
│ int32 │ varchar │
├───────┼─────────┤
│ 1     │ aa      │
│ 2     │ bb      │

I added relevant web tests to Jira. I'm interested in this implementation and 
will submit related PR later.


was (Author: JIRAUSER307770):
Indeed, some newer engines support this syntax. Besides BigQuery, I also found 
that DuckDB supports it.

I added relevant web tests to Jira. I'm interested in this implementation and 
will submit related PR later.

> Support trailing comma in SELECT list for Babel parser (like BigQuery)
> ----------------------------------------------------------------------
>
>                 Key: CALCITE-5696
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5696
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Steven Talbot
>            Assignee: Yu Xu
>            Priority: Major
>
> {code:java}
> select some_col, from my_table{code}
> works in BigQuery but does not parse in the babel parser. Probably no harm in 
> just making the babel parser able to parse that in general. But this is 
> needed for full support for Google standard SQL
> https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical#trailing_commas



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to