Skip to content

Commit

Permalink
Changes for Laura's review
Browse files Browse the repository at this point in the history
  • Loading branch information
SethSmucker committed Aug 8, 2024
1 parent c3b4fd5 commit d3c1be0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2463,6 +2463,7 @@ public static void addOption(IteratorSetting setting, String option, Object valu
*/
public static <T> void addOption(IteratorSetting setting, String option, T value, Function<T,String> valueTransformer, boolean allowBlankValues) {
// If we have a default options implementation for the specified iterator setting's class, fetch it.
System.out.println("Hey" + setting.getIteratorClass());
DefaultOptions defaultOptions = getDefaultOptions(setting.getIteratorClass());
// If the value matches the default value, do not add it to the setting.
if (defaultOptions.hasDefaultValue(option) && defaultOptions.equalsDefaultValue(option, value)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2408,17 +2408,17 @@ public static <T> void addOption(IteratorSetting cfg, String option, T value, bo
QueryOptions.addOption(cfg, option, value, allowBlankValues);
}

// public static void addOption(IteratorSetting cfg, String option, String value, boolean allowBlankValue) {
// if (StringUtils.isNotBlank(option) && (allowBlankValue || StringUtils.isNotBlank(value))) {
// // If blank value, then we need to change it to something else or it
// // will fail in InputFormatBase when run
// // through the MapReduce api.
// if (StringUtils.isBlank(value) && allowBlankValue) {
// value = " ";
// }
// cfg.addOption(option, value);
// }
// }
// public static void addOption(IteratorSetting cfg, String option, String value, boolean allowBlankValue) {
// if (StringUtils.isNotBlank(option) && (allowBlankValue || StringUtils.isNotBlank(value))) {
// // If blank value, then we need to change it to something else or it
// // will fail in InputFormatBase when run
// // through the MapReduce api.
// if (StringUtils.isBlank(value) && allowBlankValue) {
// value = " ";
// }
// cfg.addOption(option, value);
// }
// }

/**
* Load the common iterator options for both the optimized and non-optimized query paths. Said options include: enrichers, filters (post-processing and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,4 +288,4 @@ public void testDefaultOptions() {
assertEquals(0, iteratorSetting.getOptions().size());

}
}
}

0 comments on commit d3c1be0

Please sign in to comment.