drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krystal (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-4611) Date plus interval fails with "failed to preserve datatye"
Date Fri, 15 Apr 2016 23:22:25 GMT
Krystal created DRILL-4611:
------------------------------

             Summary: Date plus interval fails with "failed to preserve datatye"
                 Key: DRILL-4611
                 URL: https://issues.apache.org/jira/browse/DRILL-4611
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Relational Operators
            Reporter: Krystal


git.commit.id.abbrev=e4725ea

Adding date with interval using + operator fails.

{code}
select to_date('2017-02-01', 'YYYY-MM-dd') +  interval '1' MONTH from `dfs.drillTestDirP1`.voter
limit 1;

Error: SYSTEM ERROR: AssertionError: Internal error: Conversion to relational algebra failed
to preserve datatypes:
validated type:
RecordType(TIMESTAMP(0) NOT NULL EXPR$0) NOT NULL
converted type:
RecordType(DATE NOT NULL EXPR$0) NOT NULL
rel:
LogicalSort(fetch=[1])
  LogicalProject(EXPR$0=[DATETIME_PLUS(TO_DATE('2017-02-01', 'YYYY-MM-dd'), 1)])
    LogicalTableScan(table=[[dfs.drillTestDirP1, voter]])

[Error Id: db89b909-22ff-401f-82fe-a57df955c426 on qa-node115.qa.lab:31010]

  (org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception during fragment
initialization: Internal error: Conversion to relational algebra failed to preserve datatypes:
validated type:
RecordType(TIMESTAMP(0) NOT NULL EXPR$0) NOT NULL
converted type:
RecordType(DATE NOT NULL EXPR$0) NOT NULL
rel:
LogicalSort(fetch=[1])
  LogicalProject(EXPR$0=[DATETIME_PLUS(TO_DATE('2017-02-01', 'YYYY-MM-dd'), 1)])
    LogicalTableScan(table=[[dfs.drillTestDirP1, voter]])

    org.apache.drill.exec.work.foreman.Foreman.run():262
    java.util.concurrent.ThreadPoolExecutor.runWorker():1145
    java.util.concurrent.ThreadPoolExecutor$Worker.run():615
    java.lang.Thread.run():745
  Caused By (java.lang.AssertionError) Internal error: Conversion to relational algebra failed
to preserve datatypes:
validated type:
RecordType(TIMESTAMP(0) NOT NULL EXPR$0) NOT NULL
converted type:
RecordType(DATE NOT NULL EXPR$0) NOT NULL
rel:
LogicalSort(fetch=[1])
  LogicalProject(EXPR$0=[DATETIME_PLUS(TO_DATE('2017-02-01', 'YYYY-MM-dd'), 1)])
    LogicalTableScan(table=[[dfs.drillTestDirP1, voter]])

    org.apache.calcite.util.Util.newInternal():777
    org.apache.calcite.sql2rel.SqlToRelConverter.checkConvertedType():435
    org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery():541
    org.apache.drill.exec.planner.sql.SqlConverter.toRel():246
    org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRel():616
    org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert():195
    org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():164
    org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():94
    org.apache.drill.exec.work.foreman.Foreman.runSQL():927
    org.apache.drill.exec.work.foreman.Foreman.run():251
    java.util.concurrent.ThreadPoolExecutor.runWorker():1145
    java.util.concurrent.ThreadPoolExecutor$Worker.run():615
    java.lang.Thread.run():745 (state=,code=0)
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message