You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2024/10/20 23:06:00 UTC

[jira] [Commented] (CALCITE-6637) The result of date type will be automatically converted to timestamp type in the Arrow adapter

    [ https://issues.apache.org/jira/browse/CALCITE-6637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17891369#comment-17891369 ] 

Mihai Budiu commented on CALCITE-6637:
--------------------------------------

Can you point to some arrow documentation that justifies this fact?

> The result of date type will be automatically converted to timestamp type in the Arrow adapter
> ----------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-6637
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6637
>             Project: Calcite
>          Issue Type: Bug
>          Components: arrow-adapter
>    Affects Versions: 1.38.0
>            Reporter: Caican Cai
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 1.39.0
>
>
> When returning the result, the date type in arrow will be converted to timestamp type.
> {code:java}
>  @Test void testDateProject() {
>     String sql = "select HIREDATE from EMP";
>     String plan = "PLAN=ArrowToEnumerableConverter\n"
>         + "  ArrowProject(HIREDATE=[$4])\n"
>         + "    ArrowTableScan(table=[[ARROW, EMP]], fields=[[0, 1, 2, 3, 4, 5, 6, 7]])\n\n";
>     String result = "HIREDATE=1970-01-01 00:00:04\n"
>         + "HIREDATE=1970-01-01 00:00:04\n"
>         + "HIREDATE=1970-01-01 00:00:04\n";
>     CalciteAssert.that()
>         .with(arrow)
>         .query(sql)
>         .limit(3)
>         .returns(result)
>         .explainContains(plan);
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)