drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Kulyk <rom.ku...@gmail.com>
Subject ClassCastException (DateString cannot be cast to TimestampString) in Drill
Date Fri, 01 Sep 2017 16:31:59 GMT
Hi, team!

Working on upgrade of Calcite version for Drill I got class cast exceptions
like "ClassCastException: org.apache.calcite.util.DateString cannot be cast
to org.apache.calcite.util.TimestampString" in Drill.

This issue is reproducible we have "date + interval" situation, for example:

*where  o.o_orderdate >= date '1996-10-01'  and o.o_orderdate < date
'1996-10-01' + interval '3' month*

In this case Drill will cast DATE to TIMESTAMP and we will get
ClassCastException when Calcite will try to compare DateString
('1996-10-01') with TimestampString ('1996-10-01' + interval '3'). To avoid
this situation added a general class for Date/Time/Timestamp literals to
make them comparable to each other. You can see my commit in my local
branch: https://github.com/KulykRoman/incubator-calcite/commit/0656d8fec

So do I need to create Calcite Jira and open pull request on Calcite master
or this changes should be only in Drill-Calcite branch?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message