drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mehant Baid" <baid.meh...@gmail.com>
Subject Re: Review Request 26696: DRILL-1534: Implement UDF to expand a map into a repeated map with key, value pairs.
Date Wed, 15 Oct 2014 07:23:26 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Oct. 15, 2014, 7:23 a.m.)

Review request for drill and Jason Altekruse.


Updated patch so that function adds "key" field to the new map and doesn't add "value" field
in the case the value for the column is null in the original map

Repository: drill-git


Consider the following JSON:
{"x":{ "y": "kevin", "z": "paul" } }

Now this UDF would transform the map 'x' in the following manner
[ {"key":"y","value":"kevin"}, {"key":"z","value":"paul"}]

Currently this function only supports simple map as input and poses the following two conditions
on the values within the map
1. They should be of the same type
2. They can only be scalar types

Diffs (updated)

  exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Mappify.java PRE-CREATION

  exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MappifyUtility.java PRE-CREATION

  exec/java-exec/src/test/resources/jsoninput/input3.json PRE-CREATION 

Diff: https://reviews.apache.org/r/26696/diff/


Added unit tests and ran some manual tests via sqlline. 


Mehant Baid

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