static Reader.Options createOptionsForReader(Configuration conf) { /** * Do we have schema on read in the configuration variables? */ TypeDescription schema = OrcInputFormat.getDesiredRowTypeDescr(conf, true, Integer.MAX_VALUE); Reader.Options readerOptions = new Reader.Options(conf).schema(schema); // TODO: Convert genIncludedColumns and setSearchArgument to use TypeDescription. final List<OrcProto.Type> schemaTypes = OrcUtils.getOrcTypes(schema); readerOptions.include(OrcInputFormat.genIncludedColumns(schema, conf)); //todo: last param is bogus. why is this hardcoded? OrcInputFormat.setSearchArgument(readerOptions, schemaTypes, conf, true); return readerOptions; }
static Reader.Options createOptionsForReader(Configuration conf) { /** * Do we have schema on read in the configuration variables? */ TypeDescription schema = OrcInputFormat.getDesiredRowTypeDescr(conf, true, Integer.MAX_VALUE); Reader.Options readerOptions = new Reader.Options().schema(schema); // TODO: Convert genIncludedColumns and setSearchArgument to use TypeDescription. final List<OrcProto.Type> schemaTypes = OrcUtils.getOrcTypes(schema); readerOptions.include(OrcInputFormat.genIncludedColumns(schema, conf)); OrcInputFormat.setSearchArgument(readerOptions, schemaTypes, conf, true); return readerOptions; }
options.range(offset, length); options.include(OrcInputFormat.genIncludedColumns(schema, conf)); OrcInputFormat.setSearchArgument(options, types, conf, true);
public static RecordReader createReaderFromFile(Reader file, Configuration conf, long offset, long length ) throws IOException { if (AcidUtils.isFullAcidScan(conf)) { raiseAcidTablesMustBeReadWithAcidReaderException(conf); } /** * Do we have schema on read in the configuration variables? */ TypeDescription schema = getDesiredRowTypeDescr(conf, false, Integer.MAX_VALUE); Reader.Options options = new Reader.Options(conf).range(offset, length); options.schema(schema); boolean isOriginal = isOriginal(file); if (schema == null) { schema = file.getSchema(); } List<OrcProto.Type> types = OrcUtils.getOrcTypes(schema); options.include(genIncludedColumns(schema, conf)); setSearchArgument(options, types, conf, isOriginal); return file.rowsOptions(options, conf); }
options.range(offset, length); options.include(OrcInputFormat.genIncludedColumns(schema, conf)); OrcInputFormat.setSearchArgument(options, types, conf, true);
public static RecordReader createReaderFromFile(Reader file, Configuration conf, long offset, long length ) throws IOException { boolean isTransactionalTableScan = HiveConf.getBoolVar(conf, ConfVars.HIVE_TRANSACTIONAL_TABLE_SCAN); if (isTransactionalTableScan) { raiseAcidTablesMustBeReadWithAcidReaderException(conf); } /** * Do we have schema on read in the configuration variables? */ TypeDescription schema = getDesiredRowTypeDescr(conf, false, Integer.MAX_VALUE); Reader.Options options = new Reader.Options().range(offset, length); options.schema(schema); boolean isOriginal = isOriginal(file); if (schema == null) { schema = file.getSchema(); } List<OrcProto.Type> types = OrcUtils.getOrcTypes(schema); options.include(genIncludedColumns(schema, conf)); setSearchArgument(options, types, conf, isOriginal); return file.rowsOptions(options); }
"url,cost"); options.include(new boolean[]{true, true, false, true, false}); OrcInputFormat.setSearchArgument(options, types, conf, false); String[] colNames = options.getColumnNames(); assertEquals(null, colNames[0]);
public static RecordReader createReaderFromFile(Reader file, Configuration conf, long offset, long length ) throws IOException { Reader.Options options = new Reader.Options().range(offset, length); boolean isOriginal = isOriginal(file); List<OrcProto.Type> types = file.getTypes(); options.include(genIncludedColumns(types, conf, isOriginal)); setSearchArgument(options, types, conf, isOriginal); return file.rowsOptions(options); }
VectorizedOrcRecordReader(Reader file, Configuration conf, FileSplit fileSplit) throws IOException { List<OrcProto.Type> types = file.getTypes(); Reader.Options options = new Reader.Options(); this.offset = fileSplit.getStart(); this.length = fileSplit.getLength(); options.range(offset, length); options.include(OrcInputFormat.genIncludedColumns(types, conf, true)); OrcInputFormat.setSearchArgument(options, types, conf, true); this.reader = file.rowsOptions(options); try { rbCtx = new VectorizedRowBatchCtx(); rbCtx.init(conf, fileSplit); } catch (Exception e) { throw new RuntimeException(e); } }
Reader.Options options = new Reader.Options(); options.include(genIncludedColumns(types, context.conf, isOriginal)); setSearchArgument(options, types, context.conf, isOriginal);
final List<OrcProto.Type> types = reader.getTypes(); readOptions.include(genIncludedColumns(types, conf, split.isOriginal())); setSearchArgument(readOptions, types, conf, split.isOriginal()); } else { bucket = (int) split.getStart();