drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mufy <mufeed.us...@gmail.com>
Subject Multiple Column Aliasing Into A Nested JSON Data Fails
Date Fri, 10 Oct 2014 13:42:15 GMT
The below works.

0: jdbc:drill:zk=n67:5181> select Reservations[0].OwnerId as ID,
Reservations[0].ReservationId as RID from dfs.`aws.json`;
+------------+------------+
|     ID     |    RID     |
+------------+------------+
| 898107336781 | r-48a03243 |
+------------+------------+
1 row selected (0.217 seconds)


But when I dig a little deeper into my nested JSON to do a multiple column
aliasing it fails.


0: jdbc:drill:zk=n67:5181> select Reservations[0].Instances[0].InstanceId
as ID, Reservations[0].Instances[0].PrivateDnsName as IP from
dfs.`aws.json`;
Query failed: Failure while running fragment. index: -4, length: 4
(expected: range(0, 16384)) [fea47ee2-f588-4fbf-bb2b-113e25c71779]

Error: exception while executing query: Failure while trying to get next
result batch. (state=,code=0)


Although I'm able to reach the elements into the nested JSON individually.


0: jdbc:drill:zk=n67:5181> select Reservations[0].Instances[0].InstanceId
as ID from dfs.`aws.json`;
+------------+
|     ID     |
+------------+
| i-85d5e28e |
+------------+
1 row selected (0.182 seconds)

0: jdbc:drill:zk=n67:5181> select
Reservations[0].Instances[0].PrivateDnsName as IP from dfs.`aws.json`;
+------------+
|     IP     |
+------------+
| ip-10-253-11-180.us-west-2.compute.internal |
+------------+
1 row selected (0.174 seconds)

Is it my query or a bug?

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