static void setSearchArgument(Reader.Options options, List<OrcProto.Type> types, Configuration conf, boolean isOriginal) { String neededColumnNames = getNeededColumnNamesString(conf); if (neededColumnNames == null) { LOG.debug("No ORC pushdown predicate - no column names"); options.searchArgument(null, null); return; } SearchArgument sarg = ConvertAstToSearchArg.createFromConf(conf); if (sarg == null) { LOG.debug("No ORC pushdown predicate"); options.searchArgument(null, null); return; } if (LOG.isInfoEnabled()) { LOG.info("ORC pushdown predicate: " + sarg); } options.searchArgument(sarg, getSargColumnNames( neededColumnNames.split(","), types, options.getInclude(), isOriginal)); }
static void setSearchArgument(Reader.Options options, List<OrcProto.Type> types, Configuration conf, boolean isOriginal) { String neededColumnNames = getNeededColumnNamesString(conf); if (neededColumnNames == null) { LOG.debug("No ORC pushdown predicate - no column names"); options.searchArgument(null, null); return; } SearchArgument sarg = ConvertAstToSearchArg.createFromConf(conf); if (sarg == null) { LOG.debug("No ORC pushdown predicate"); options.searchArgument(null, null); return; } if (LOG.isInfoEnabled()) { LOG.info("ORC pushdown predicate: " + sarg); } options.searchArgument(sarg, getSargColumnNames( neededColumnNames.split(","), types, options.getInclude(), isOriginal)); }
if (hillviewSchema != null) hillviewDesc = hillviewSchema.getColumnDescriptions(); boolean[] include = options.getInclude(); List<IAppendableColumn> toCreate = new ArrayList<IAppendableColumn>();
Reader.Options options) { boolean allowMissingMetadata = options.getTolerateMissingSchema(); boolean[] includedCols = options.getInclude(); this.isSchemaEvolutionCaseAware=options.getIsSchemaEvolutionCaseAware(); this.readerIncluded = includedCols == null ? null :
final ORCScanFilter orcScanFilter = (ORCScanFilter) filter; final SearchArgument sarg = orcScanFilter.getSarg(); options.searchArgument(sarg, OrcInputFormat.getSargColumnNames(selectedColNames, types, options.getInclude(), fSplit.isOriginal()));
/** * Convert from the row include/sarg/columnNames to the event equivalent * for the underlying file. * @param options options for the row reader * @return a cloned options object that is modified for the event reader */ static Reader.Options createEventOptions(Reader.Options options) { Reader.Options result = options.clone(); result.range(options.getOffset(), Long.MAX_VALUE); result.include(options.getInclude()); // slide the column names down by 6 for the name array if (options.getColumnNames() != null) { String[] orig = options.getColumnNames(); String[] cols = new String[orig.length + OrcRecordUpdater.FIELDS]; for(int i=0; i < orig.length; ++i) { cols[i + OrcRecordUpdater.FIELDS] = orig[i]; } result.searchArgument(options.getSearchArgument(), cols); } return result; }
/** * Convert from the row include/sarg/columnNames to the event equivalent * for the underlying file. * @param options options for the row reader * @param rowSchema schema of the row, excluding ACID columns * @return a cloned options object that is modified for the event reader */ static Reader.Options createEventOptions(Reader.Options options, TypeDescription rowSchema) { Reader.Options result = options.clone(); result.include(options.getInclude()); // slide the column names down by 6 for the name array if (options.getColumnNames() != null) { String[] orig = options.getColumnNames(); String[] cols = new String[orig.length + OrcRecordUpdater.FIELDS]; for(int i=0; i < orig.length; ++i) { cols[i + OrcRecordUpdater.FIELDS] = orig[i]; } result.searchArgument(options.getSearchArgument(), cols); } // schema evolution will insert the acid columns to row schema for ACID read result.schema(rowSchema); return result; }