You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Alessandro Solimando (Jira)" <ji...@apache.org> on 2020/10/01 21:52:00 UTC

[jira] [Resolved] (CALCITE-4293) cassandra adapter returns null when selecting non-null tuple elements

     [ https://issues.apache.org/jira/browse/CALCITE-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alessandro Solimando resolved CALCITE-4293.
-------------------------------------------
    Resolution: Not A Bug

This is not a bug since struct fields must be accessed via the DOT operator, while the ticket example features ITEM operator.

The corresponding version of the proposed unit test is passing correctly:
{code:java}
  @Test void testTupleInnerValues() {
    CalciteAssert.that()
        .with(DTCASSANDRA)
        .query("select \"test_collections\".\"f_tuple\".\"1\","
            + "\"test_collections\".\"f_tuple\".\"2\","
            + "\"test_collections\".\"f_tuple\".\"3\""
            + " from \"test_collections\"")
        .returns("1=3000000000"
            + "; 2=30ff87"
            + "; 3=2015-05-03 11:30:54\n");
  }
{code}

> cassandra adapter returns null when selecting non-null tuple elements
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-4293
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4293
>             Project: Calcite
>          Issue Type: Bug
>          Components: cassandra-adapter
>    Affects Versions: 1.25.0
>            Reporter: Alessandro Solimando
>            Assignee: Alessandro Solimando
>            Priority: Major
>
> The following test currently fails due to the _EXPR$i_ elements are null and don't match their actual value within the _f_tuple_ field:
> {code:java}
> @Test void testTupleInnerValues() {
>  CalciteAssert.that()
>  .with(DTCASSANDRA)
>  .query("select x['1'], x['2'], x['3'] from "
>  + "(select \"f_tuple\" from \"test_collections\") as T(x)")
>  .returns("EXPR$0=3000000000"
>  + "; EXPR$1=30ff87"
>  + "; EXPR$2=2015-05-03 13:30:54\n");
> }{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)