You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2020/10/06 07:12:00 UTC
[jira] [Commented] (CALCITE-4301) Unit tests for Cassandra adapter
are wrongly applying ITEM operator to STRUCT columns
[ https://issues.apache.org/jira/browse/CALCITE-4301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17208526#comment-17208526 ]
Stamatis Zampetakis commented on CALCITE-4301:
----------------------------------------------
Its true that Andrei touched this part of code while fixing CALCITE-2442 but he only changed {{@Ignore}} to {{@Disabled}}.
I will test locally and merge the branch/PR when the code freeze is over.
Apart from that we should find a way to re-enable the tests without necessarily waiting for Cassandra 4. If the tests remain disabled for a long time they will become rotten.
> Unit tests for Cassandra adapter are wrongly applying ITEM operator to STRUCT columns
> -------------------------------------------------------------------------------------
>
> Key: CALCITE-4301
> URL: https://issues.apache.org/jira/browse/CALCITE-4301
> Project: Calcite
> Issue Type: Test
> Components: cassandra-adapter
> Affects Versions: 1.25.0
> Reporter: Alessandro Solimando
> Assignee: Alessandro Solimando
> Priority: Minor
>
> The following unit tests included in "cassandra/src/test/java/org/apache/calcite/test/CassandraAdapterDataTypesTest.java" are wrong, as they apply _ITEM_ operator to a struct column _f_tuple_, instead of the _DOT_ operator.
> {code:java}
> @Test void testCollectionsInnerRowType() {
> CalciteAssert.that()
> .with(DTCASSANDRA)
> .query("select \"f_list\"[1], "
> + "\"f_map\"['k1'], "
> + "\"f_tuple\"['1'], "
> + "\"f_tuple\"['2'], "
> + "\"f_tuple\"['3']"
> + " from \"test_collections\"")
> .typeIs("[EXPR$0 INTEGER"
> + ", EXPR$1 VARCHAR"
> + ", EXPR$2 BIGINT"
> + ", EXPR$3 VARBINARY"
> + ", EXPR$4 TIMESTAMP]");
> }
> @Test void testCollectionsInnerValues() {
> CalciteAssert.that()
> .with(DTCASSANDRA)
> .query("select \"f_list\"[1], "
> + "\"f_map\"['k1'], "
> + "\"f_tuple\"['1'], "
> + "\"f_tuple\"['2'], "
> + "\"f_tuple\"['3']"
> + " from \"test_collections\"")
> .returns("EXPR$0=1"
> + "; EXPR$1=v1"
> + "; EXPR$2=3000000000"
> + "; EXPR$3=30ff87"
> + "; EXPR$4=2015-05-03 13:30:54.234");
> }{code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)