This is an automated email from the ASF dual-hosted git repository.
zabetak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/master by this push:
new 5ae3c16 [CALCITE-4301] Unit test 'testCollectionsInnerValues()' for
Cassandra adapter is wrong (Alessandro Solimando)
5ae3c16 is described below
commit 5ae3c16153fd81fdf28f8493eb3c0178b860f269
Author: Alessandro Solimando <[email protected]>
AuthorDate: Fri Oct 2 00:04:18 2020 +0200
[CALCITE-4301] Unit test 'testCollectionsInnerValues()' for Cassandra
adapter is wrong (Alessandro Solimando)
Tested with guava.version 25.0-jre
Close apache/calcite#2199
---
.../test/CassandraAdapterDataTypesTest.java | 27 ++++++++++------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git
a/cassandra/src/test/java/org/apache/calcite/test/CassandraAdapterDataTypesTest.java
b/cassandra/src/test/java/org/apache/calcite/test/CassandraAdapterDataTypesTest.java
index e07fec5..ffed5e0 100644
---
a/cassandra/src/test/java/org/apache/calcite/test/CassandraAdapterDataTypesTest.java
+++
b/cassandra/src/test/java/org/apache/calcite/test/CassandraAdapterDataTypesTest.java
@@ -22,7 +22,6 @@ import com.google.common.collect.ImmutableMap;
import org.cassandraunit.CQLDataLoader;
import org.cassandraunit.dataset.cql.ClassPathCQLDataSet;
import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.parallel.Execution;
@@ -176,33 +175,31 @@ class CassandraAdapterDataTypesTest {
.with(DTCASSANDRA)
.query("select \"f_list\"[1], "
+ "\"f_map\"['k1'], "
- + "\"f_tuple\"['1'], "
- + "\"f_tuple\"['2'], "
- + "\"f_tuple\"['3']"
+ + "\"test_collections\".\"f_tuple\".\"1\", "
+ + "\"test_collections\".\"f_tuple\".\"2\", "
+ + "\"test_collections\".\"f_tuple\".\"3\""
+ " from \"test_collections\"")
.typeIs("[EXPR$0 INTEGER"
+ ", EXPR$1 VARCHAR"
- + ", EXPR$2 BIGINT"
- + ", EXPR$3 VARBINARY"
- + ", EXPR$4 TIMESTAMP]");
+ + ", 1 BIGINT"
+ + ", 2 VARBINARY"
+ + ", 3 TIMESTAMP]");
}
- // ignored as tuple elements returns 'null' when accessed in the select
statement
- @Disabled
@Test void testCollectionsInnerValues() {
CalciteAssert.that()
.with(DTCASSANDRA)
.query("select \"f_list\"[1], "
+ "\"f_map\"['k1'], "
- + "\"f_tuple\"['1'], "
- + "\"f_tuple\"['2'], "
- + "\"f_tuple\"['3']"
+ + "\"test_collections\".\"f_tuple\".\"1\", "
+ + "\"test_collections\".\"f_tuple\".\"2\", "
+ + "\"test_collections\".\"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");
+ + "; 1=3000000000"
+ + "; 2=30ff87"
+ + "; 3=2015-05-03 11:30:54\n");
}
// frozen collections should not affect the row type