Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
Description
KVGen function currently doesn't support maps with changing data types on values. We should throw helpful error message indicating that this is not an unsupported functionality rather than execution exception.
0: jdbc:drill:zk=local> select attributes from dfs.`/users/nrentachintala/Downloads/yelp/yelp_academic_dataset_business.json` limit 2;
------------
attributes |
------------
{"By Appointment Only":true,"Good For":{},"Ambience":{},"Parking":{},"Music":{},"Hair Types Specialized In":{},"Payment Types":{},"Dietary Restrictions":{}} |
{"Take-out":true,"Good For":
{"dessert":false,"latenight":false,"lunch":true,"dinner":false,"breakfast":false,"brunch":false}
,"Caters":false,"Noise Level":"average","Takes Reservations":false,"Delivery":false,"Ambience": {"romantic":false,"intimate":false,"touristy":false,"hipster":false,"divey":false,"classy":false,"trendy":false,"upscale":false,"casual":false},"Parking": {"garage":false,"street":false,"validated":false,"lot":true,"valet":false},"Has TV":true,"Outdoor Seating":false,"Attire":"casual","Alcohol":"none","Waiter Service":true,"Accepts Credit Cards":true,"Good for Kids":true,"Good For Groups":true,"Price Range":1,"Music":{},"Hair Types Specialized In":{},"Payment Types":{},"Dietary Restrictions":{}} |
------------
2 rows selected (0.274 seconds)
0: jdbc:drill:zk=local> select kvgen(attributes) from dfs.`/users/nrentachintala/Downloads/yelp/yelp_academic_dataset_business.json` limit 2;
Query failed: Query failed: Failure while running fragment., org.apache.drill.exec.vector.complex.impl.NullableBitWriterImpl cannot be cast to org.apache.drill.exec.vector.complex.impl.SingleMapWriter [ 24bcf2c3-c995-4451-8e11-4e804050388f on 10.0.0.6:31010 ]
[ 24bcf2c3-c995-4451-8e11-4e804050388f on 10.0.0.6:31010 ]
Error: exception while executing query: Failure while executing query. (state=,code=0)
Attachments
Issue Links
- is duplicated by
-
DRILL-2118 Improve error message to inform the user if mappify/kvgen fails due to ClassCastException
- Resolved