This is an automated email from the ASF dual-hosted git repository. jhyde pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/calcite.git
commit 95b3ab6abd7b0272fff977472633926fde9b9495 Author: snuyanzin <[email protected]> AuthorDate: Tue Sep 28 02:06:29 2021 +0200 [CALCITE-4600] ClassCastException retrieving from an ARRAY that has DATE, TIME or TIMESTAMP elements Now that we have upgraded Calcite to Avatica 1.19, which fixes [CALCITE-4600], we can add this test case to Calcite. Close apache/calcite#2548 --- core/src/test/java/org/apache/calcite/test/JdbcTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/src/test/java/org/apache/calcite/test/JdbcTest.java b/core/src/test/java/org/apache/calcite/test/JdbcTest.java index 2589947..02a1465 100644 --- a/core/src/test/java/org/apache/calcite/test/JdbcTest.java +++ b/core/src/test/java/org/apache/calcite/test/JdbcTest.java @@ -7755,6 +7755,16 @@ public class JdbcTest { .returns("F={1}\n"); } + /** Test case for + * <a href="https://issues.apache.org/jira/browse/CALCITE-4600">[CALCITE-4600] + * ClassCastException retrieving from an ARRAY that has DATE, TIME or + * TIMESTAMP elements</a>. */ + @Test public void testArrayOfDates() { + CalciteAssert.that() + .query("select array[cast('1900-1-1' as date)]") + .returns("EXPR$0=[1900-01-01]\n"); + } + private static String sums(int n, boolean c) { final StringBuilder b = new StringBuilder(); for (int i = 0; i < n; i++) {
