Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
0.9.0
-
None
-
None
-
RHEL 6.4
Description
When trying to query and filter out the currently servicing Drillbit,
e.g.
0: jdbc:drill:schema=dfs> select * from sys.drillbits;
------------------------------------------------------
host | user_port | control_port | data_port | current |
------------------------------------------------------
drlvm-123.qa.lab | 31010 | 31011 | 31012 | true |
drlvm-121.qa.lab | 31010 | 31011 | 31012 | false |
drlvm-122.qa.lab | 31010 | 31011 | 31012 | false |
------------------------------------------------------
a SQL Parsing exception is thrown when running the following:
0: jdbc:drill:schema=dfs> select * from sys.drillbits where current = true;
Query failed: Query failed: Failure parsing SQL. Encountered "where current" at line 1, column 29.
Was expecting one of:
....
Error: exception while executing query: Failure while executing query. (state=,code=0)
The system table description is:
0: jdbc:drill:schema=dfs> describe sys.drillbits;
----------------------------------
COLUMN_NAME | DATA_TYPE | IS_NULLABLE |
----------------------------------
host | VARCHAR | NO |
user_port | INTEGER | NO |
control_port | INTEGER | NO |
data_port | INTEGER | NO |
current | BOOLEAN | NO |
----------------------------------
Alternatives also failed:
select * from sys.drillbits where current = `true`;
select * from sys.drillbits where current = 1;
select * from sys.drillbits where current = '1';
select * from sys.drillbits where current;
Interestingly, when testing against sys.options; the boolean predicates work as expected (in both formats):
select * from sys.options where bool_val = true;
select * from sys.options where bool_val;