> On Oct. 15, 2014, 4:52 p.m., Jason Altekruse wrote: > > exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestComplexTypeReader.java, > > line 187 > > <https://reviews.apache.org/r/26696/diff/1/?file=721040#file721040line187> > > > > I'm going to look into generating a parquet file with some mock data of > > various types in different levels of nesting. I think there are too many > > places where we have code written against a lot of types and no simple > > means of testing all of them in a nested setting.
That would be good to have. We also probably need to have cast functions that can operate on single map/ single list and can cast the entire list/map to a specific type. > On Oct. 15, 2014, 4:52 p.m., Jason Altekruse wrote: > > exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MappifyUtility.java, > > line 122 > > <https://reviews.apache.org/r/26696/diff/1/?file=721039#file721039line122> > > > > Did you use some kind of a script to generate this? or did you just > > write it by hand? While there are places in the code where we have and > > written code for managing a bunch of types, it would be best to just check > > in any automated tool you used to generate this if you used one. I briefly thought about using freemarker but decided against it because this seemed like a specific use case. - Mehant ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/26696/#review56615 ----------------------------------------------------------- On Oct. 15, 2014, 8:44 p.m., Mehant Baid wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/26696/ > ----------------------------------------------------------- > > (Updated Oct. 15, 2014, 8:44 p.m.) > > > Review request for drill and Jason Altekruse. > > > Repository: drill-git > > > Description > ------- > > 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 > ----- > > > 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/main/java/org/apache/drill/exec/vector/complex/MapUtility.java > PRE-CREATION > > exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestComplexTypeReader.java > 2e62897 > exec/java-exec/src/test/resources/jsoninput/input3.json PRE-CREATION > > Diff: https://reviews.apache.org/r/26696/diff/ > > > Testing > ------- > > Added unit tests and ran some manual tests via sqlline. > > > Thanks, > > Mehant Baid > >
