JiajunBernoulli opened a new pull request, #2847:
URL: https://github.com/apache/calcite/pull/2847
# insert values case
Here is the sql
```
insert into t3 values ('a', 1.0, 1), ('b', 2, 2), ('c', 3.0, CAST(3 AS
SMALLINT)), ('d', 4.0, 4), ('e', 5.0, 5)
```
the validated sql is :
```
INSERT INTO `CATALOG`.`SALES`.`T3`
VALUES ROW('a', CAST(1.0 AS INTEGER), CAST(1 AS SMALLINT)),
ROW('b', 2, CAST(2 AS SMALLINT)),-- Encountered an integer and ended early
ROW('c', 3.0, CAST(3 AS SMALLINT)),Encountered an samllint and ended early
ROW('d', 4.0, 4), -- missing cast
ROW('e', 5.0, 5) -- missing cast
```
the right validated sql is:
```
INSERT INTO `CATALOG`.`SALES`.`T3`
VALUES ROW('a', CAST(1.0 AS INTEGER), CAST(1 AS SMALLINT)),
ROW('b', 2, CAST(2 AS SMALLINT)),
ROW('c', CAST(3.0 AS INTEGER), CAST(3 AS SMALLINT)),
ROW('d', CAST(4.0 AS INTEGER), CAST(4 AS SMALLINT)),
ROW('e', CAST(5.0 AS INTEGER), CAST(5 AS SMALLINT))
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]