Options for creating a RecordReader. @since 1.1.0
| 216 | * @since 1.1.0 |
| 217 | */ |
| 218 | class Options implements Cloneable { |
| 219 | private boolean[] include; |
| 220 | private long offset = 0; |
| 221 | private long length = Long.MAX_VALUE; |
| 222 | private int positionalEvolutionLevel; |
| 223 | private SearchArgument sarg = null; |
| 224 | private String[] columnNames = null; |
| 225 | private Boolean useZeroCopy = null; |
| 226 | private Boolean skipCorruptRecords = null; |
| 227 | private TypeDescription schema = null; |
| 228 | private String[] preFilterColumns = null; |
| 229 | Consumer<OrcFilterContext> skipRowCallback = null; |
| 230 | private DataReader dataReader = null; |
| 231 | private Boolean tolerateMissingSchema = null; |
| 232 | private boolean forcePositionalEvolution; |
| 233 | private boolean isSchemaEvolutionCaseAware = |
| 234 | (boolean) OrcConf.IS_SCHEMA_EVOLUTION_CASE_SENSITIVE.getDefaultValue(); |
| 235 | private boolean includeAcidColumns = true; |
| 236 | private boolean allowSARGToFilter = false; |
| 237 | private boolean useSelected = false; |
| 238 | private boolean allowPluginFilters = false; |
| 239 | private List<String> pluginAllowListFilters = null; |
| 240 | private int minSeekSize = (int) OrcConf.ORC_MIN_DISK_SEEK_SIZE.getDefaultValue(); |
| 241 | private double minSeekSizeTolerance = (double) OrcConf.ORC_MIN_DISK_SEEK_SIZE_TOLERANCE |
| 242 | .getDefaultValue(); |
| 243 | private int rowBatchSize = (int) OrcConf.ROW_BATCH_SIZE.getDefaultValue(); |
| 244 | |
| 245 | /** |
| 246 | * @since 1.1.0 |
| 247 | */ |
| 248 | public Options() { |
| 249 | // PASS |
| 250 | } |
| 251 | |
| 252 | /** |
| 253 | * @since 1.1.0 |
| 254 | */ |
| 255 | public Options(Configuration conf) { |
| 256 | useZeroCopy = OrcConf.USE_ZEROCOPY.getBoolean(conf); |
| 257 | skipCorruptRecords = OrcConf.SKIP_CORRUPT_DATA.getBoolean(conf); |
| 258 | tolerateMissingSchema = OrcConf.TOLERATE_MISSING_SCHEMA.getBoolean(conf); |
| 259 | forcePositionalEvolution = OrcConf.FORCE_POSITIONAL_EVOLUTION.getBoolean(conf); |
| 260 | positionalEvolutionLevel = OrcConf.FORCE_POSITIONAL_EVOLUTION_LEVEL.getInt(conf); |
| 261 | isSchemaEvolutionCaseAware = |
| 262 | OrcConf.IS_SCHEMA_EVOLUTION_CASE_SENSITIVE.getBoolean(conf); |
| 263 | allowSARGToFilter = OrcConf.ALLOW_SARG_TO_FILTER.getBoolean(conf); |
| 264 | useSelected = OrcConf.READER_USE_SELECTED.getBoolean(conf); |
| 265 | allowPluginFilters = OrcConf.ALLOW_PLUGIN_FILTER.getBoolean(conf); |
| 266 | pluginAllowListFilters = OrcConf.PLUGIN_FILTER_ALLOWLIST.getStringAsList(conf); |
| 267 | minSeekSize = OrcConf.ORC_MIN_DISK_SEEK_SIZE.getInt(conf); |
| 268 | minSeekSizeTolerance = OrcConf.ORC_MIN_DISK_SEEK_SIZE_TOLERANCE.getDouble(conf); |
| 269 | rowBatchSize = OrcConf.ROW_BATCH_SIZE.getInt(conf); |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * Set the list of columns to read. |
| 274 | * @param include a list of columns to read |
| 275 | * @return this |
nothing calls this directly
no test coverage detected