Caican Cai created CALCITE-6637:
-----------------------------------
Summary: 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
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)