You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Khurram Faraaz (JIRA)" <ji...@apache.org> on 2016/10/03 09:30:20 UTC

[jira] [Comment Edited] (DRILL-4918) Adding 2 dates results in AssertionError: Multiple functions with best cost found

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

Khurram Faraaz edited comment on DRILL-4918 at 10/3/16 9:30 AM:
----------------------------------------------------------------

Postgres returns an error

{noformat}
postgres=# select current_date + current_date from (values(1)) as foo;
ERROR:  operator does not exist: date + date
LINE 1: select current_date + current_date from (values(1)) as foo;
{noformat}

Drill returns an assertion with a not so easy to understand error message, on Drill 1.9.0

{noformat}
0: jdbc:drill:schema=dfs.tmp> select current_date + current_date from (values(1)) as foo;
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:
LogicalProject(EXPR$0=[DATETIME_PLUS(CURRENT_DATE, CURRENT_DATE)])
  LogicalValues(tuples=[[{ 1 }]])



[Error Id: 8cbbf21b-2c97-4332-b26e-d92648efa688 on centos-01.qa.lab:31010] (state=,code=0)
{noformat}


was (Author: khfaraaz):
Postgres returns an error

{nodormat}
postgres=# select current_date + current_date from (values(1)) as foo;
ERROR:  operator does not exist: date + date
LINE 1: select current_date + current_date from (values(1)) as foo;
{noformat}

Drill returns an assertion with a not so easy to understand error message, on Drill 1.9.0
{noformat}
0: jdbc:drill:schema=dfs.tmp> select current_date + current_date from (values(1)) as foo;
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:
LogicalProject(EXPR$0=[DATETIME_PLUS(CURRENT_DATE, CURRENT_DATE)])
  LogicalValues(tuples=[[{ 1 }]])



[Error Id: 8cbbf21b-2c97-4332-b26e-d92648efa688 on centos-01.qa.lab:31010] (state=,code=0)
{noformat}

> Adding 2 dates results in AssertionError: Multiple functions with best cost found
> ---------------------------------------------------------------------------------
>
>                 Key: DRILL-4918
>                 URL: https://issues.apache.org/jira/browse/DRILL-4918
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types, Functions - Drill
>            Reporter: Rahul Challapalli
>         Attachments: error.log
>
>
> git.commit.id.abbrev=2295715
> The below query fails
> {code}
> select l_commitdate+l_receiptdate from cp.`tpch/lineitem.parquet`;
> Error: SYSTEM ERROR: AssertionError: Multiple functions with best cost found
> Fragment 0:0
> [Error Id: 983983bd-73e3-45c8-a377-e7022a5899c7 on qa-node182.qa.lab:31010] (state=,code=0)
> {code}
> The more likely scenario is that this operation is not supported. Atleast we should throw a proper error message. I attached the error from the logs



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