[VOTE] Release Apache Drill 1.5.0 RC1

2016-02-03 Thread Jason Altekruse
Hello all,

I'd like to propose the second release candidate (rc1) of Apache Drill,
version
1.5.0. It covers a total of 54 resolved JIRAs [1]. Thanks to everyone who
contributed to this release. This release candidate includes a small test
modification that was detailed on the vote thread for RC0.

The tarball artifacts are hosted at [2] and the maven artifacts are hosted
at
[3]. This release candidate is based on commit
c3939c55cf3e274c9bcbc8ca860603e7197cfa16 located at [4].

The vote will be open for the next ~72 hours ending at 7AM Pacific,
January 6, 2016.

[ ] +1
[ ] +0
[ ] -1

Here's my vote: +1

Thanks,
Jason

[1]
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12313820=12332948
[2] http://people.apache.org/~json/apache-drill-1.5.0.rc1/
[3] https://repository.apache.org/content/repositories/orgapachedrill-1024

[4] https://github.com/jaltekruse/incubator-drill/tree/1.5-release-rc1


[jira] [Created] (DRILL-4346) NumberFormatException when casting empty string to int in hbase/maprdb

2016-02-03 Thread Vitalii Diravka (JIRA)
Vitalii Diravka created DRILL-4346:
--

 Summary: NumberFormatException when casting empty string to int in 
hbase/maprdb
 Key: DRILL-4346
 URL: https://issues.apache.org/jira/browse/DRILL-4346
 Project: Apache Drill
  Issue Type: Bug
  Components: Functions - Drill
Affects Versions: 1.2.0
Reporter: Vitalii Diravka
Assignee: Vitalii Diravka


Queries to null values in HBase with no data when casting to Integer results in 
NumberFormatException: 
{code}
Data 

row1,1,2 
row2,,4 
row3,5,6 
row4,7,8 

Create Table 

$ maprcli table create -path /user/cmatta/projects/cmatta_test 
$ maprcli table cf create -path /user/cmatta/projects/cmatta_test -cfname a 

Load into Hbase table: 

hbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.separator=',' 
-Dimporttsv.columns=HBASE_ROW_KEY,a:c1,a:c2 /user/cmatta/projects/cmatta_test 
maprfs:///user/cmatta/projects/testdata_hbase_null 
{code}
{code}
0: jdbc:drill:> select cast(x.`row_key` as varchar(128)) as `row_key`, 
CAST(x.`a`.`c1` as INTEGER) from maprfs.cmatta.`cmatta_test` x; 
Error: SYSTEM ERROR: NumberFormatException: 

Fragment 0:0 

[Error Id: 05a0e5ed-d830-4926-a442-569c9d70d0b4 on se-node11.se.lab:31010] 
(state=,code=0) 
{code}



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


[jira] [Created] (DRILL-4349) parquet reader returns wrong results when reading a nullable column that starts with a large number of nulls (>30k)

2016-02-03 Thread Deneche A. Hakim (JIRA)
Deneche A. Hakim created DRILL-4349:
---

 Summary: parquet reader returns wrong results when reading a 
nullable column that starts with a large number of nulls (>30k)
 Key: DRILL-4349
 URL: https://issues.apache.org/jira/browse/DRILL-4349
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - Parquet
Affects Versions: 1.4.0
Reporter: Deneche A. Hakim
Assignee: Deneche A. Hakim
Priority: Critical
 Fix For: 1.6.0


While reading a nullable column, if in a single pass we only read null values, 
the parquet reader resets the value of pageReader.readPosInBytes which will 
lead to wrong data read from the file.

To reproduce the issue, create a csv file (repro.csv) with 2 columns (id, val) 
with 50100 rows, where id equals to the row number and val is empty for the 
first 50k rows, and equal to id for the remaining rows.

create a parquet table from the csv file:
{noformat}
CREATE TABLE `repro_parquet` AS SELECT CAST(columns[0] AS INT) AS id, 
CAST(NULLIF(columns[1], '') AS DOUBLE) AS val from `repro.csv`;
{noformat}

Now if you query any of the non null values you will get wrong results:
{noformat}
0: jdbc:drill:zk=local> select * from `repro_parquet` where id>=5 limit 10;
++---+
|   id   |val|
++---+
| 5  | 9.11337776337441E-309 |
| 50001  | 3.26044E-319  |
| 50002  | 1.4916681476489723E-154   |
| 50003  | 2.18890676|
| 50004  | 2.681561588521345E154 |
| 50005  | -2.1016574E-317   |
| 50006  | -1.4916681476489723E-154  |
| 50007  | -2.18890676   |
| 50008  | -2.681561588521345E154|
| 50009  | 2.1016574E-317|
++---+
10 rows selected (0.238 seconds)
{noformat}

and here are the expected values:
{noformat}
0: jdbc:drill:zk=local> select * from `repro.csv` where cast(columns[0] as 
int)>=5 limit 10;
++
|  columns   |
++
| ["5","5"]  |
| ["50001","50001"]  |
| ["50002","50002"]  |
| ["50003","50003"]  |
| ["50004","50004"]  |
| ["50005","50005"]  |
| ["50006","50006"]  |
| ["50007","50007"]  |
| ["50008","50008"]  |
| ["50009","50009"]  |
++
{noformat}

I confirmed that the file is written correctly and the issue is in the parquet 
reader (already have a fix for it)



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


[GitHub] drill pull request: Open a pull request

2016-02-03 Thread vataga
GitHub user vataga opened a pull request:

https://github.com/apache/drill/pull/354

Open a pull request

Open a pull request

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/vataga/drill DRILL-4346

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/drill/pull/354.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #354


commit 1802a6bdb10a99ee23902298f8c31bda890815e6
Author: vataga 
Date:   2016-02-02T11:18:49Z

MD-509: Fix NumberFormatException when casting empty string to int in 
hbase/maprdb

New commit




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: Md 509

2016-02-03 Thread vataga
GitHub user vataga opened a pull request:

https://github.com/apache/drill/pull/355

Md 509



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/vataga/drill MD-509

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/drill/pull/355.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #355


commit 1802a6bdb10a99ee23902298f8c31bda890815e6
Author: vataga 
Date:   2016-02-02T11:18:49Z

MD-509: Fix NumberFormatException when casting empty string to int in 
hbase/maprdb

New commit

commit 950c92ca0e77b26260404fc6ba6bf0bb5f307401
Author: vataga 
Date:   2016-02-02T11:18:49Z

DRILL-4346: Handle NumberFormatException when casting empty string to int 
in hbase/maprdb

- Made replacing of functions casting for nullable input varbinary and 
var16char types are working (in CastFunctions.java setting 
'drill.exec.functions.cast_empty_string_to_null = true' hadn't work);
- Added new generated classes for casting varbinary and var16char to int 
(CastEmptyStringVarTypesToNullableNumeric template and Casts.tdd data);
- Created a test (in TestHBaseQueries.java) for checking an empty string to 
integer casting in hbase table.

commit f574db834e79bb7967e785f0f635dd6fc2007d52
Author: Vitalii Diravka 
Date:   2016-02-03T15:08:58Z

Merge branch 'MD-509' of https://github.com/vataga/drill into DRILL-4346




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: DRILL-4349: parquet reader returns wrong resul...

2016-02-03 Thread adeneche
Github user adeneche commented on the pull request:

https://github.com/apache/drill/pull/356#issuecomment-179551062
  
@parthchandra can you please review ? thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: DRILL-4349: parquet reader returns wrong resul...

2016-02-03 Thread adeneche
GitHub user adeneche opened a pull request:

https://github.com/apache/drill/pull/356

DRILL-4349: parquet reader returns wrong results when reading a nulla…

…ble column that starts with a large number of nulls (>30k)

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/adeneche/incubator-drill DRILL-4349

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/drill/pull/356.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #356


commit a1bc0c7dc11a117d18b6ae74b91e6390138be20f
Author: adeneche 
Date:   2016-02-03T23:42:22Z

DRILL-4349: parquet reader returns wrong results when reading a nullable 
column that starts with a large number of nulls (>30k)




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request: DRILL-4323: When converting HiveParquetScan To...

2016-02-03 Thread jinfengni
Github user jinfengni commented on the pull request:

https://github.com/apache/drill/pull/349#issuecomment-179526708
  
LGTM.

+1




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (DRILL-4350) Error messages need to be escaped in Web UI

2016-02-03 Thread Nathan Smith (JIRA)
Nathan Smith created DRILL-4350:
---

 Summary: Error messages need to be escaped in Web UI
 Key: DRILL-4350
 URL: https://issues.apache.org/jira/browse/DRILL-4350
 Project: Apache Drill
  Issue Type: Bug
Affects Versions: 1.4.0
Reporter: Nathan Smith
Priority: Trivial


Some error messages don't display properly in the HTML web UI. I believe that 
adding the [html 
built-in|http://freemarker.incubator.apache.org/docs/ref_builtins_string.html#ref_builtin_html]
 to some of the templates.



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


[jira] [Created] (DRILL-4351) SQL keyword CURRENT is used as column name in sys.drillbits

2016-02-03 Thread Khurram Faraaz (JIRA)
Khurram Faraaz created DRILL-4351:
-

 Summary: SQL keyword CURRENT is used as column name in 
sys.drillbits
 Key: DRILL-4351
 URL: https://issues.apache.org/jira/browse/DRILL-4351
 Project: Apache Drill
  Issue Type: Bug
  Components: SQL Parser
Affects Versions: 1.5.0
Reporter: Khurram Faraaz


current is a SQL keyword, we will have to rename it to a different word, say 
foreman, in sys.drillbits table. We hit this issue when user tries to project 
the column named current in sys.drillbits

Drill git commit ID : 6a36a704 (1.5.0-SNAPSHOT)
JDK8

current is a keyword in these DBMSs
MS SQL Server
Oracle
DB2 

{noformat}
0: jdbc:drill:schema=dfs.tmp> select * from sys.drillbits;
+---++---++--+
| hostname  | user_port  | control_port  | data_port  | current  |
+---++---++--+
| centos-03.qa.lab  | 31010  | 31011 | 31012  | true |
| centos-01.qa.lab  | 31010  | 31011 | 31012  | false|
| centos-02.qa.lab  | 31010  | 31011 | 31012  | false|
| centos-04.qa.lab  | 31010  | 31011 | 31012  | false|
+---++---++--+
4 rows selected (0.238 seconds)
0: jdbc:drill:schema=dfs.tmp> select hostname from sys.drillbits;
+---+
| hostname  |
+---+
| centos-03.qa.lab  |
| centos-01.qa.lab  |
| centos-02.qa.lab  |
| centos-04.qa.lab  |
+---+
4 rows selected (0.178 seconds)

0: jdbc:drill:schema=dfs.tmp> select current from sys.drillbits;
Error: PARSE ERROR: Encountered "current from" at line 1, column 8.
Was expecting one of:
"UNION" ...
"INTERSECT" ...
"EXCEPT" ...
...
"EXISTS" ...
"(" ...


while parsing SQL query:
select current from sys.drillbits
   ^


[Error Id: 07e0161c-9c36-44bb-b584-40fef11fa9e8 on centos-03.qa.lab:31010] 
(state=,code=0)
 
{noformat}

>From drillbit.log
 
 {noformat}
 [Error Id: 07e0161c-9c36-44bb-b584-40fef11fa9e8 ]
at 
org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:543)
 ~[drill-common-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
at 
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:164)
 [drill-java-exec-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:924) 
[drill-java-exec-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:250) 
[drill-java-exec-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[na:1.8.0_65]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
[na:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]
Caused by: org.apache.calcite.sql.parser.SqlParseException: Encountered 
"current from" at line 1, column 8.
Was expecting one of:
"UNION" ...
"INTERSECT" ...
"EXCEPT" ...
"ORDER" ...
"LIMIT" ...
"OFFSET" ...
"FETCH" ...
"STREAM" ...
"DISTINCT" ...
"ALL" ...
"*" ...
"+" ...
"-" ...
 ...
 ...
 ...
 ...
 ...
 ...
 ...
"TRUE" ...
"FALSE" ...
"UNKNOWN" ...
"NULL" ...
 ...
 ...
 ...
"DATE" ...
"TIME" ...
"TIMESTAMP" ...
"INTERVAL" ...
"?" ...
"CAST" ...
"EXTRACT" ...
"POSITION" ...
"CONVERT" ...
"TRANSLATE" ...
"OVERLAY" ...
"FLOOR" ...
"CEIL" ...
"CEILING" ...
"SUBSTRING" ...
"TRIM" ...
 ...
"MULTISET" ...
"ARRAY" ...
"SPECIFIC" ...
 ...
 ...
 ...
 ...
 ...
"ABS" ...
"AVG" ...
"CARDINALITY" ...
"CHAR_LENGTH" ...
"CHARACTER_LENGTH" ...
"COALESCE" ...
"COLLECT" ...
"COVAR_POP" ...
"COVAR_SAMP" ...
"CUME_DIST" ...
"COUNT" ...
"CURRENT_DATE" ...
"CURRENT_TIME" ...
"CURRENT_TIMESTAMP" ...
"DENSE_RANK" ...
"ELEMENT" ...
"EXP" ...
"FIRST_VALUE" ...
"FUSION" ...
"GROUPING" ...
"LAST_VALUE" ...
"LN" ...
"LOCALTIME" ...
"LOCALTIMESTAMP" ...
"LOWER" ...
"MAX" ...
"MIN" ...
"MOD" ...
"NULLIF" ...
"OCTET_LENGTH" ...
"PERCENT_RANK" ...
"POWER" ...
"RANK" ...
"REGR_SXX" ...
"REGR_SYY" ...
"ROW_NUMBER" ...
"SQRT" ...
"STDDEV_POP" ...
"STDDEV_SAMP" ...
"SUM" ...
"UPPER" ...
"VAR_POP" ...
"VAR_SAMP" ...
"CURRENT_CATALOG" ...
"CURRENT_DEFAULT_TRANSFORM_GROUP" ...
"CURRENT_PATH" ...
"CURRENT_ROLE" ...
"CURRENT_SCHEMA" ...
"CURRENT_USER" ...
"SESSION_USER" ...
"SYSTEM_USER" ...
"USER" ...
"NEW" ...
"CASE" ...

[jira] [Created] (DRILL-4347) Planning time for query64 from TPCDS test suite has increased 10 times compared to 1.4 release

2016-02-03 Thread Victoria Markman (JIRA)
Victoria Markman created DRILL-4347:
---

 Summary: Planning time for query64 from TPCDS test suite has 
increased 10 times compared to 1.4 release
 Key: DRILL-4347
 URL: https://issues.apache.org/jira/browse/DRILL-4347
 Project: Apache Drill
  Issue Type: Bug
  Components: Query Planning & Optimization
Affects Versions: 0.5.0
Reporter: Victoria Markman


mapr-drill-1.5.0.201602012001-1.noarch.rpm
{code}
0: jdbc:drill:schema=dfs> WITH cs_ui
. . . . . . . . . . . . >  AS (SELECT cs_item_sk,
. . . . . . . . . . . . > Sum(cs_ext_list_price) AS sale,
. . . . . . . . . . . . > Sum(cr_refunded_cash + 
cr_reversed_charge
. . . . . . . . . . . . > + cr_store_credit) AS refund
. . . . . . . . . . . . >  FROM   catalog_sales,
. . . . . . . . . . . . > catalog_returns
. . . . . . . . . . . . >  WHERE  cs_item_sk = cr_item_sk
. . . . . . . . . . . . > AND cs_order_number = cr_order_number
. . . . . . . . . . . . >  GROUP  BY cs_item_sk
. . . . . . . . . . . . >  HAVING Sum(cs_ext_list_price) > 2 * Sum(
. . . . . . . . . . . . > cr_refunded_cash + cr_reversed_charge
. . . . . . . . . . . . > + cr_store_credit)),
. . . . . . . . . . . . >  cross_sales
. . . . . . . . . . . . >  AS (SELECT i_product_name product_name,
. . . . . . . . . . . . > i_item_sk  item_sk,
. . . . . . . . . . . . > s_store_name   store_name,
. . . . . . . . . . . . > s_zip  store_zip,
. . . . . . . . . . . . > ad1.ca_street_number   
b_street_number,
. . . . . . . . . . . . > ad1.ca_street_name b_streen_name,
. . . . . . . . . . . . > ad1.ca_cityb_city,
. . . . . . . . . . . . > ad1.ca_zip b_zip,
. . . . . . . . . . . . > ad2.ca_street_number   
c_street_number,
. . . . . . . . . . . . > ad2.ca_street_name c_street_name,
. . . . . . . . . . . . > ad2.ca_cityc_city,
. . . . . . . . . . . . > ad2.ca_zip c_zip,
. . . . . . . . . . . . > d1.d_year  AS syear,
. . . . . . . . . . . . > d2.d_year  AS fsyear,
. . . . . . . . . . . . > d3.d_year  s2year,
. . . . . . . . . . . . > Count(*)   cnt,
. . . . . . . . . . . . > Sum(ss_wholesale_cost) s1,
. . . . . . . . . . . . > Sum(ss_list_price) s2,
. . . . . . . . . . . . > Sum(ss_coupon_amt) s3
. . . . . . . . . . . . >  FROM   store_sales,
. . . . . . . . . . . . > store_returns,
. . . . . . . . . . . . > cs_ui,
. . . . . . . . . . . . > date_dim d1,
. . . . . . . . . . . . > date_dim d2,
. . . . . . . . . . . . > date_dim d3,
. . . . . . . . . . . . > store,
. . . . . . . . . . . . > customer,
. . . . . . . . . . . . > customer_demographics cd1,
. . . . . . . . . . . . > customer_demographics cd2,
. . . . . . . . . . . . > promotion,
. . . . . . . . . . . . > household_demographics hd1,
. . . . . . . . . . . . > household_demographics hd2,
. . . . . . . . . . . . > customer_address ad1,
. . . . . . . . . . . . > customer_address ad2,
. . . . . . . . . . . . > income_band ib1,
. . . . . . . . . . . . > income_band ib2,
. . . . . . . . . . . . > item
. . . . . . . . . . . . >  WHERE  ss_store_sk = s_store_sk
. . . . . . . . . . . . > AND ss_sold_date_sk = d1.d_date_sk
. . . . . . . . . . . . > AND ss_customer_sk = c_customer_sk
. . . . . . . . . . . . > AND ss_cdemo_sk = cd1.cd_demo_sk
. . . . . . . . . . . . > AND ss_hdemo_sk = hd1.hd_demo_sk
. . . . . . . . . . . . > AND ss_addr_sk = ad1.ca_address_sk
. . . . . . . . . . . . > AND ss_item_sk = i_item_sk
. . . . . . . . . . . . > AND ss_item_sk = sr_item_sk
. . . . . . . . . . . . > AND ss_ticket_number = 
sr_ticket_number
. . . . . . . . . . . . > AND ss_item_sk = cs_ui.cs_item_sk
. . . . . . . . . . . . > AND c_current_cdemo_sk = 
cd2.cd_demo_sk
. . . . . . . . . . . . > AND c_current_hdemo_sk = 
hd2.hd_demo_sk
. . . . . . . . . . . . > AND c_current_addr_sk = 
ad2.ca_address_sk
. . . . . . . . . . . . > AND c_first_sales_date_sk = 
d2.d_date_sk
. . . . 

[jira] [Created] (DRILL-4348) Date arithmetic issues

2016-02-03 Thread Nathan Smith (JIRA)
Nathan Smith created DRILL-4348:
---

 Summary: Date arithmetic issues
 Key: DRILL-4348
 URL: https://issues.apache.org/jira/browse/DRILL-4348
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types, Execution - Relational Operators
Affects Versions: 1.4.0
Reporter: Nathan Smith


I have been encountering issues while trying to do date(time) arithmetic. 
According to https://issues.apache.org/jira/browse/DRILL-549, the subtraction 
operator should work with DATE types, but I am getting following error when 
executing this type of query:

{code}
SELECT 
COUNT((CAST(tran_dttm AS DATE) - DATE '2012-07-01') < 0) AS 
before_july, 
COUNT((CAST(tran_dttm AS DATE) - DATE '2012-07-01') > 0) AS after_july 
FROM dfs.root.ldg_tran_parquet WHERE EXTRACT(year FROM tran_dttm) = 2012
{code}

{code}
2016-02-03 15:02:39,891 [qtp254153532-52] ERROR 
o.a.d.e.server.rest.QueryResources - Query from Web UI Failed
org.apache.drill.common.exceptions.UserRemoteException: VALIDATION ERROR: From 
line 2, column 9 to line 2, column 59: Cannot apply '-' to arguments of type 
' - '. Supported form(s): ' - '
' - '
' - '


[Error Id: 73b5df2c-14f6-424c-83c7-af4a6158247c on 
drill-standalone.aunsight.office:31010]

  (org.apache.calcite.tools.ValidationException) 
org.apache.calcite.runtime.CalciteContextException: From line 2, column 9 to 
line 2, column 59: Cannot apply '-' to arguments of type ' - '. 
Supported form(s): ' - '
' - '
' - '
org.apache.calcite.prepare.PlannerImpl.validate():189
org.apache.calcite.prepare.PlannerImpl.validateAndGetType():198

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode():451

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert():198
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():167
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():197
org.apache.drill.exec.work.foreman.Foreman.runSQL():909
org.apache.drill.exec.work.foreman.Foreman.run():244
java.util.concurrent.ThreadPoolExecutor.runWorker():1145
java.util.concurrent.ThreadPoolExecutor$Worker.run():615
java.lang.Thread.run():745
  Caused By (org.apache.calcite.runtime.CalciteContextException) From line 2, 
column 9 to line 2, column 59: Cannot apply '-' to arguments of type ' - 
'. Supported form(s): ' - '
' - '
' - '
sun.reflect.NativeConstructorAccessorImpl.newInstance0():-2
sun.reflect.NativeConstructorAccessorImpl.newInstance():57
sun.reflect.DelegatingConstructorAccessorImpl.newInstance():45
java.lang.reflect.Constructor.newInstance():526
org.apache.calcite.runtime.Resources$ExInstWithCause.ex():405
org.apache.calcite.sql.SqlUtil.newContextException():714
org.apache.calcite.sql.SqlUtil.newContextException():702
org.apache.calcite.sql.validate.SqlValidatorImpl.newValidationError():3931
org.apache.calcite.sql.SqlCallBinding.newValidationSignatureError():275

org.apache.calcite.sql.type.FamilyOperandTypeChecker.checkSingleOperandType():92
org.apache.calcite.sql.type.FamilyOperandTypeChecker.checkOperandTypes():109

org.apache.calcite.sql.type.CompositeOperandTypeChecker.checkOperandTypes():245
org.apache.calcite.sql.SqlOperator.checkOperandTypes():563
org.apache.calcite.sql.SqlOperator.validateOperands():420
org.apache.calcite.sql.SqlOperator.deriveType():487
org.apache.calcite.sql.SqlBinaryOperator.deriveType():143

org.apache.calcite.sql.validate.SqlValidatorImpl$DeriveTypeVisitor.visit():4268

org.apache.calcite.sql.validate.SqlValidatorImpl$DeriveTypeVisitor.visit():4255
org.apache.calcite.sql.SqlCall.accept():130
org.apache.calcite.sql.validate.SqlValidatorImpl.deriveTypeImpl():1495
org.apache.calcite.sql.validate.SqlValidatorImpl.deriveType():1478
org.apache.calcite.sql.SqlOperator.deriveType():483
org.apache.calcite.sql.SqlBinaryOperator.deriveType():143

org.apache.calcite.sql.validate.SqlValidatorImpl$DeriveTypeVisitor.visit():4268

org.apache.calcite.sql.validate.SqlValidatorImpl$DeriveTypeVisitor.visit():4255
org.apache.calcite.sql.SqlCall.accept():130
org.apache.calcite.sql.validate.SqlValidatorImpl.deriveTypeImpl():1495
org.apache.calcite.sql.validate.SqlValidatorImpl.deriveType():1478
org.apache.calcite.sql.SqlFunction.deriveType():288
org.apache.calcite.sql.SqlFunction.deriveType():230
org.apache.calcite.sql.fun.SqlCountAggFunction.deriveType():88

org.apache.calcite.sql.validate.SqlValidatorImpl$DeriveTypeVisitor.visit():4268

org.apache.calcite.sql.validate.SqlValidatorImpl$DeriveTypeVisitor.visit():4255
org.apache.calcite.sql.SqlCall.accept():130
org.apache.calcite.sql.validate.SqlValidatorImpl.deriveTypeImpl():1495
org.apache.calcite.sql.validate.SqlValidatorImpl.deriveType():1478