You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Danny Chen (Jira)" <ji...@apache.org> on 2021/01/05 12:06:00 UTC
[jira] [Created] (CALCITE-4456) Allows all the value expressions
for explicit row value constructor
Danny Chen created CALCITE-4456:
-----------------------------------
Summary: Allows all the value expressions for explicit row value constructor
Key: CALCITE-4456
URL: https://issues.apache.org/jira/browse/CALCITE-4456
Project: Calcite
Issue Type: Task
Components: core
Affects Versions: 1.26.0
Reporter: Danny Chen
Assignee: Danny Chen
Fix For: 1.27.0
In SQL standard 2011 part 7 value expression, it defines the SQL syntax for explicit ROW value constructor to allows all the valid value expreesion:
{code:sql}
<row value constructor> ::=
<common value expression>
| <boolean value expression>
| <explicit row value constructor>
<common value expression> ::=
<numeric value expression>
| <string value expression>
| <datetime value expression>
| <interval value expression>
| <user-defined type value expression>
| <reference value expression>
| <collection value expression>
<explicit row value constructor> ::=
<left paren> <row value constructor element> <comma>
<row value constructor element list> <right paren>
| ROW <left paren> <row value constructor element list> <right paren>
| <row subquery>
<row value constructor element> ::=
<value expression>
{code}
I also tried the PostgreSQL 9.6 for the query:
{code:sql}
create table t1(
f0 int,
f1 varchar(20)
);
insert into t1 values(1, 'abc');
-- select row(t1.f0 + 1, t1.f1) from t1; -- outputs (2, abc)
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)