[ 
https://issues.apache.org/jira/browse/CALCITE-5950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Evgeny Stanilovsky updated CALCITE-5950:
----------------------------------------
    Description: 
II change table.iq a bit and found a problem with processing default column 
expression:
{code:java}
CREATE TABLE tdef (i int not null, j int DEFAULT 100);
(0 rows modified)

!update

INSERT INTO tdef VALUES (1, DEFAULT);
(1 row modified)

!update

INSERT INTO tdef(i) VALUES (2);
(1 row modified)

!update

SELECT * FROM tdef ORDER BY i;
+---+-----+
| I | J   |
+---+-----+
| 1 | 100 |
| 2 | 100 |
+---+-----+
(2 rows)

!ok

but obtain from calcite:

+---+-----+
| I | J   |
+---+-----+
| 1 |     |
| 2 | 100 |
+---+-----+
{code}

  was:
II change table.iq a bit and found a problem with processing default column 
expression:
{code:java}
CREATE TABLE tdef (i int not null, j int default 100);
(0 rows modified)

!update

INSERT INTO tdef VALUES (1, DEFAULT);
(1 row modified)

!update

INSERT INTO tdef(i) VALUES (2);
(1 row modified)

!update

SELECT * FROM tdef ORDER BY i;
+---+-----+
| I | J   |
+---+-----+
| 1 | 100 |
| 2 | 100 |
+---+-----+
(2 rows)

!ok

but obtain from calcite:

+---+-----+
| I | J   |
+---+-----+
| 1 |     |
| 2 | 100 |
+---+-----+
{code}


> Default column constraint is erroneously processed
> --------------------------------------------------
>
>                 Key: CALCITE-5950
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5950
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.35.0
>            Reporter: Evgeny Stanilovsky
>            Assignee: Evgeny Stanilovsky
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.36.0
>
>
> II change table.iq a bit and found a problem with processing default column 
> expression:
> {code:java}
> CREATE TABLE tdef (i int not null, j int DEFAULT 100);
> (0 rows modified)
> !update
> INSERT INTO tdef VALUES (1, DEFAULT);
> (1 row modified)
> !update
> INSERT INTO tdef(i) VALUES (2);
> (1 row modified)
> !update
> SELECT * FROM tdef ORDER BY i;
> +---+-----+
> | I | J   |
> +---+-----+
> | 1 | 100 |
> | 2 | 100 |
> +---+-----+
> (2 rows)
> !ok
> but obtain from calcite:
> +---+-----+
> | I | J   |
> +---+-----+
> | 1 |     |
> | 2 | 100 |
> +---+-----+
> {code}



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

Reply via email to