You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Alessandro Solimando (Jira)" <ji...@apache.org> on 2020/10/01 22:00:00 UTC
[jira] [Created] (CALCITE-4301) Unit test
'testCollectionsInnerValues()' for Cassandra adapter is wrong
Alessandro Solimando created CALCITE-4301:
---------------------------------------------
Summary: Unit test 'testCollectionsInnerValues()' for Cassandra adapter is wrong
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
The following unit test included in `cassandra/src/test/java/org/apache/calcite/test/CassandraAdapterDataTypesTest.java` is wrong, as it applied _ITEM_ operator to a struct field _f_tuple_, instead of the _DOT_ operator, returning _null_ instead of the correct _non-null_ values. __
{code:java}
@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)