Source:
public void pushdownFilterAndProjection(PageSourceOptions options, int[] channelColumns, List<Type> types, Block[] constantBlocks) { reuseBlocks = options.getReusePages(); reorderFilters = options.getReorderFilters(); this.constantBlocks = constantBlocks; Map<Integer, Filter> filters = predicate.getFilters(); for (int i = 0; i < channelColumns.length; i++) { if (constantBlocks[i] != null) { Filter filter = filters.get(channelColumns[i]); if (filter != null && !filter.testNull()) { constantFilterIsFalse = true; return; } } } FilterFunction[] filterFunctions = options.getFilterFunctions(); boolean anyConstantFilterFunctions = false; ImmutableList.Builder<FilterFunction> nonDeterministicBuilder = ImmutableList.builder(); for (FilterFunction filter : filterFunctions) { if (qualifyingSet == null) { qualifyingSet = new QualifyingSet(); } qualifyingSet.setRange(0, 1); if (isConstantFilterFunction(filter, constantBlocks)) { if (filter.isDeterministic()) { evaluateConstantFilterFunction(filter, constantBlocks, qualifyingSet); { if (qualifyingSet.isEmpty()) { constantFilterIsFalse = true; return; } ErrorSet errors = qualifyingSet.getOrCreateErrorSet(); if (!errors.isEmpty()) { constantError = errors.getFirstError(1); } } } else { nonDeterministicBuilder.add(filter); } anyConstantFilterFunctions = true; } } nonDeterministicConstantFilters = nonDeterministicBuilder.build(); reader = new ColumnGroupReader( streamReaders, presentColumns, channelColumns, types, options.getInternalChannels(), options.getOutputChannels(), filters, anyConstantFilterFunctions ? Arrays.stream(filterFunctions).filter(f -> !isConstantFilterFunction(f, constantBlocks)).toArray(FilterFunction[]::new) : filterFunctions, reorderFilters, options.getAriaFlags(), constantBlocks); targetResultBytes = options.getTargetBytes(); reader.setResultSizeBudget(targetResultBytes); }

Target:
public void pushdownFilterAndProjection(PageSourceOptions options, int[] channelColumns, List<Type> types, Block[] constantBlocks) { reuseBlocks = options.getReusePages(); this.constantBlocks = requireNonNull(constantBlocks, "constantBlocks is null"); verify(currentRowGroup == -1, "Should not call pushdownFilterAndProjection() after getNextPage()"); Map<Integer, Filter> filters = predicate.getFilters(); for (int i = 0; i < channelColumns.length; i++) { if (constantBlocks[i] != null) { Filter filter = filters.get(channelColumns[i]); if (filter != null) { verify(constantBlocks[i].isNull(0), "Non-null constant blocks are not supported"); if (!filter.testNull()) { constantFilterIsFalse = true; return; } } } } FilterFunction[] filterFunctions = options.getFilterFunctions(); boolean anyConstantFilterFunctions = false; ImmutableList.Builder<FilterFunction> nonDeterministicBuilder = ImmutableList.builder(); for (FilterFunction filter : filterFunctions) { if (isConstantFilterFunction(filter, constantBlocks)) { if (filter.isDeterministic()) { qualifyingSet.setRange(0, 1); evaluateConstantFilterFunction(filter, constantBlocks, qualifyingSet); if (qualifyingSet.isEmpty()) { constantFilterIsFalse = true; return; } ErrorSet errors = qualifyingSet.getOrCreateErrorSet(); if (!errors.isEmpty()) { constantError = errors.getFirstError(1); } } else { nonDeterministicBuilder.add(filter); } anyConstantFilterFunctions = true; } } nonDeterministicConstantFilters = nonDeterministicBuilder.build(); reader = new ColumnGroupReader( streamReaders, presentColumns, channelColumns, types, options.getInternalChannels(), options.getOutputChannels(), filters, anyConstantFilterFunctions ? Arrays.stream(filterFunctions).filter(f -> !isConstantFilterFunction(f, constantBlocks)).toArray(FilterFunction[]::new) : filterFunctions, enforceMemoryBudget, constantBlocks); targetResultBytes = options.getTargetBytes(); reader.setResultSizeBudget(targetResultBytes); }