You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "benj (Jira)" <ji...@apache.org> on 2020/05/18 08:38:00 UTC
[jira] [Created] (DRILL-7740) LEAST and GREATEST does not work well
with date in embedded mode
benj created DRILL-7740:
---------------------------
Summary: LEAST and GREATEST does not work well with date in embedded mode
Key: DRILL-7740
URL: https://issues.apache.org/jira/browse/DRILL-7740
Project: Apache Drill
Issue Type: Bug
Components: Functions - Drill, Functions - Hive
Affects Versions: 1.17.0
Reporter: benj
There seems to be a huge problem with LEAST and GREATEST functions in embedded modewhen using them with DATE type
{code:sql}
bash bin/drill-embedded
apache drill> SELECT a, b, LEAST(a,b) AS min_a_b, GREATEST(a,b) AS max_a_b FROM (select to_date('2018-02-26','yyyy-MM-dd') AS a, to_date('2018-02-28','yyyy-MM-dd') AS b);
+------------+------------+------------+------------+
| a | b | min_a_b | max_a_b |
+------------+------------+------------+------------+
| 2018-02-26 | 2018-02-28 | 2018-02-25 | 2018-02-27 |
+------------+------------+------------+------------+
{code}
min_a_b = 2018-02-25 instead of 2018-02-26
max_a_b = 2018-02-27 instead of 2018-02-28
Please note that first time I use LEAST or GREATEST I have a warning:
{noformat}
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.hadoop.hive.common.StringInternUtils (file:.../apache-drill-1.17.0/jars/drill-hive-exec-shaded-1.17.0.jar) to field java.net.URI.string
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.hive.common.StringInternUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
{noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)