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

Caican Cai commented on CALCITE-6637:
-------------------------------------

[~mbudiu]Hello, here is the official record of Arrow document: 
https://arrow.apache.org/docs/java/jdbc.html#type-mapping
https://arrow.apache.org/docs/cpp/api/datatype.html#_CPPv4N5arrow8DateTypeE

> 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)

Reply via email to