[
https://issues.apache.org/jira/browse/DRILL-416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13933847#comment-13933847
]
Xiao Meng edited comment on DRILL-416 at 3/13/14 6:37 PM:
----------------------------------------------------------
Oops , it does not exactly work. The expression will be converted to a 32-bit
singed integer.
{code:sql}
0: jdbc:drill:zk=local> select 2147483647.9 from INFORMATION_SCHEMA.CATALOGS;
+------------+
| EXPR$0 |
+------------+
| 2147483647 |
+------------+
1 row selected (0.173 seconds)
0: jdbc:drill:zk=local> select 2147483648 from INFORMATION_SCHEMA.CATALOGS;
+------------+
| EXPR$0 |
+------------+
| -2147483648 |
+------------+
1 row selected (0.162 seconds)
{code}
was (Author: xiaom):
Oops , it not exactly works. The expression will be converted to a 32-bit
singed integer.
{code:sql}
0: jdbc:drill:zk=local> select 2147483647.9 from INFORMATION_SCHEMA.CATALOGS;
+------------+
| EXPR$0 |
+------------+
| 2147483647 |
+------------+
1 row selected (0.173 seconds)
0: jdbc:drill:zk=local> select 2147483648 from INFORMATION_SCHEMA.CATALOGS;
+------------+
| EXPR$0 |
+------------+
| -2147483648 |
+------------+
1 row selected (0.162 seconds)
{code}
> Make Drill work with SELECT without FROM
> ----------------------------------------
>
> Key: DRILL-416
> URL: https://issues.apache.org/jira/browse/DRILL-416
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.0.0-milestone-2
> Reporter: Chun Chang
>
> This works with postgres:
> [root@qa-node120 ~]# sudo -u postgres psql foodmart
> foodmart=# select 1+1.1;
> ?column?
> ----------
> 2.1
> (1 row)
> But does not work with Drill:
> 0: jdbc:drill:> select 1+1.1;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while
> running query.[error_id: "100f4d4c-1ee1-495e-9c2f-547aae75473d"
> endpoint {
> address: "qa-node118.qa.lab"
> user_port: 31010
> control_port: 31011
> data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < SqlParseException:[ Encountered
> \"<EOF>\" at line 1, column 12.\nWas expecting one of:....
--
This message was sent by Atlassian JIRA
(v6.2#6252)