drill
drill copied to clipboard
Boolean expression failed to execute in mysql plugin
Boolean expression failed to execute in mysql plugin
- The version information is as follows:
apache drill> select commit_message, commit_time from sys.version;
+----------------------------------------------------------------------------------+---------------------------+
| commit_message | commit_time |
+----------------------------------------------------------------------------------+---------------------------+
| DRILL-8314: Add support for automatically retrying and disabling broken storage plugins (https://github.com/apache/drill/pull/2655) | 18.10.2022 @ 18:15:31 CST |
- Create tables and insert data in mysql database.
CREATE TABLE bt1 (
c1 int ,
c2 tinyint(1) DEFAULT NULL
)
INSERT INTO bt1 VALUES (1,1),(10,0);
- Create mysql Plugins in Storage label via http://localhost:8047/storage pages
- The sql statement is executed as follows
apache drill (mysql.test)> use mysql.test;
+------+----------------------------------------+
| ok | summary |
+------+----------------------------------------+
| true | Default schema changed to [mysql.test] |
apache drill (mysql.test)> select c2,c2 and true ,
2...............semicolon> c2 and c2,
3...............semicolon> c2 or true ,
4...............semicolon> c2 or c2 ,
8...............semicolon> c2 and false ,
9...............semicolon> c2 or false ,
10...............semicolon> not c2
11...............semicolon> from bt1
12...............semicolon> where c1=1;
Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the SQL query.
Sql: SELECT `c2`, `c2`, `c2`, CAST(TRUE AS BOOLEAN), `c2`, CAST(FALSE AS BOOLEAN), `c2`, NOT `c2`
FROM `test`.`bt1`
WHERE `c1` = 1
Fragment: 0:0
[Error Id: a7344f04-4964-4913-bded-7b098280906f on DESKTOP-PHHB7LC:31010] (state=,code=0)
But there was no problem with the other commit in the master version.
- The version information is as follows:
apache drill> select commit_message, commit_time from sys.version;
+-----------------------------------------------------------+---------------------------+
| commit_message | commit_time |
+-----------------------------------------------------------+---------------------------+
| DRILL-8273: Complex typed columns cannot be made implicit | 31.07.2022 @ 14:34:14 CST |
+-----------------------------------------------------------+---------------------------+
apache drill (mysql.test)> select c2,c2 and true ,
2...............semicolon> c2 and c2,
4...............semicolon> c2 or true ,
5...............semicolon> c2 or c2 ,
6...............semicolon> c2 and false ,
7...............semicolon> c2 or false ,
8...............semicolon> not c2
9...............semicolon> from bt1
10...............semicolon> where c1=1;
+------+--------+--------+--------+--------+--------+--------+--------+
| c2 | EXPR$1 | EXPR$2 | EXPR$3 | EXPR$4 | EXPR$5 | EXPR$6 | EXPR$7 |
+------+--------+--------+--------+--------+--------+--------+--------+
| true | 1 | 1 | 1 | 1 | 0 | 1 | 0 |
+------+--------+--------+--------+--------+--------+--------+--------+