[
https://issues.apache.org/jira/browse/CALCITE-3423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16954066#comment-16954066
]
Julian Hyde commented on CALCITE-3423:
--------------------------------------
The type is called BOOLEAN. Can you adjust, so that people can find this case
when they search.
Can you paste the exception? Again, so that people can find this case.
> Support using CAST operation and bool type value in table macro
> ---------------------------------------------------------------
>
> Key: CALCITE-3423
> URL: https://issues.apache.org/jira/browse/CALCITE-3423
> Project: Calcite
> Issue Type: New Feature
> Reporter: Wang Yanlin
> Priority: Major
>
> Currently, using bool type or cast operation in table macro, got exception.
> Add the code snippet below in *JdbcTest* to reproduce.
>
> {code:java}
> // check for cast
> resultSet = connection.createStatement().executeQuery(
> "select * from table(\"s\".\"Str\"(MAP['a', 1, 'baz', 2], cast(1 as
> bigint))) as t(n)");
> assertThat(CalciteAssert.toString(resultSet),
> equalTo("N={'a'=1, 'baz'=2}\n"
> + "N=1 \n"));
> // check for bool type
> resultSet = connection.createStatement().executeQuery(
> "select * from table(\"s\".\"Str\"(MAP['a', 1, 'baz', 2], true)) as
> t(n)");
> assertThat(CalciteAssert.toString(resultSet),
> equalTo("N={'a'=1, 'baz'=2}\n"
> + "N=true \n"));
> // check for nested cast
> resultSet = connection.createStatement().executeQuery(
> "select * from table(\"s\".\"Str\"(MAP['a', 1, 'baz', 2],"
> + "cast(cast(1 as int) as varchar(1)))) as t(n)");
> assertThat(CalciteAssert.toString(resultSet),
> equalTo("N={'a'=1, 'baz'=2}\n"
> + "N=1 \n"));
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)