drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chun Chang <cch...@maprtech.com>
Subject Re: [jira] [Created] (DRILL-2749) Boolean test fails when querying to identify current Drillbit in SQLLine
Date Fri, 10 Apr 2015 17:53:49 GMT
0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select * from sys.drillbits
where `current` = true;
+------------+------------+--------------+------------+------------+
|  hostname  | user_port  | control_port | data_port  |  current   |
+------------+------------+--------------+------------+------------+
| qa-node120.qa.lab | 31010      | 31011        | 31012      | true       |
+------------+------------+--------------+------------+------------+
1 row selected (0.192 seconds)

On Fri, Apr 10, 2015 at 10:43 AM, Kunal Khatua (JIRA) <jira@apache.org>
wrote:

> Kunal Khatua created DRILL-2749:
> -----------------------------------
>
>              Summary: Boolean test fails when querying to identify current
> Drillbit in SQLLine
>                  Key: DRILL-2749
>                  URL: https://issues.apache.org/jira/browse/DRILL-2749
>              Project: Apache Drill
>           Issue Type: Bug
>     Affects Versions: 0.9.0
>          Environment: RHEL 6.4
>             Reporter: Kunal Khatua
>              Fix For: 0.9.0
>
>
> 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;
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>

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