> On March 24, 2014, 7:11 p.m., Ryota Egashira wrote: > > in addition to rohini's comment. > > how about making it more generic EL funct, where user can specify > > separator(e.,g ',' 'AND' 'OR') and equal symbol (e.g, '=', '==', etc) in > > argument?, since there could be new requirement in future more than "," "=" > > pair for hive export/import. > > current dataInPartitionFilter somehow trying to hide the detail, only > > asking user to specify action type to make it easy. but also good to > > provide new configurable EL funct for those who know what they are doing.
Hi Ryota, I like your idea of generalizing various aspects of new EL function (separator, equal symbol) so that it can handle newer use-cases to generate single partition value in future, without the need to add a new function for each of them. Will do that. - Satish ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19449/#review38343 ----------------------------------------------------------- On March 20, 2014, 6 a.m., Satish Mittal wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19449/ > ----------------------------------------------------------- > > (Updated March 20, 2014, 6 a.m.) > > > Review request for oozie and Ryota Egashira. > > > Repository: oozie-git > > > Description > ------- > > Currently oozie provides coord EL functions to get partition filter string > (where key-values are separated by AND) for various action types - > java/pig/hive. However this doesn't work in other cases, e.g. hive action > that performs export/import of hive partition. In that case, the partition > value is expected to be in a different format: > (col1="value1",col2="value2"...). > > If we use any existing EL function like coord:dataInPartitionFilter, the > value of partition looks like: > (minute='00' AND month='03' AND year='2014' AND hour='09' AND day='11') > In this case, Hive export fails with error: > FAILED: ParseException line 1:51 mismatched input 'AND' expecting ) near > ''00'' in export statement > > We need to add a new EL function that returns partition value in the above > format. > > > Diffs > ----- > > core/src/main/java/org/apache/oozie/coord/HCatELFunctions.java e5f0146 > core/src/main/resources/oozie-default.xml 34362aa > core/src/test/java/org/apache/oozie/coord/TestHCatELFunctions.java f46f1ec > sharelib/hcatalog/src/main/java/org/apache/oozie/util/HCatURI.java d797f9b > > Diff: https://reviews.apache.org/r/19449/diff/ > > > Testing > ------- > > - Manually verified the new EL function on my local setup. > - Added new test cases for the same. > > > Thanks, > > Satish Mittal > >
