private void setupHashTable() throws SchemaChangeException { final List<Comparator> comparators = Lists.newArrayListWithExpectedSize(conditions.size()); conditions.forEach(cond->comparators.add(JoinUtils.checkAndReturnSupportedJoinComparator(cond))); if ( skipHashTableBuild ) { return; } // Setup the hash table configuration object List<NamedExpression> leftExpr = new ArrayList<>(conditions.size()); // Create named expressions from the conditions for (int i = 0; i < conditions.size(); i++) { leftExpr.add(new NamedExpression(conditions.get(i).getLeft(), new FieldReference("probe_side_" + i))); } // Set the left named expression to be null if the probe batch is empty. if (leftUpstream != IterOutcome.OK_NEW_SCHEMA && leftUpstream != IterOutcome.OK) { leftExpr = null; } else { if (probeBatch.getSchema().getSelectionVectorMode() != BatchSchema.SelectionVectorMode.NONE) { final String errorMsg = new StringBuilder().append("Hash join does not support probe batch with selection vectors. ").append("Probe batch has selection mode = ").append (probeBatch.getSchema().getSelectionVectorMode()).toString(); throw new SchemaChangeException(errorMsg); } } final HashTableConfig htConfig = new HashTableConfig((int) context.getOptions().getOption(ExecConstants.MIN_HASH_TABLE_SIZE), true, HashTable.DEFAULT_LOAD_FACTOR, rightExpr, leftExpr, comparators, joinControl.asInt()); // Create the chained hash table baseHashTable = new ChainedHashTable(htConfig, context, allocator, buildBatch, probeBatch, null); if (enableRuntimeFilter) { setupHash64(htConfig); } }
this.popConfig = popConfig; this.isRowKeyJoin = popConfig.isRowKeyJoin(); this.joinControl = new JoinControl(popConfig.getJoinControl());
if (joinControl.isIntersectDistinct() && matchExists) { currentCompositeIdx = joinControl.isIntersectDistinct() ? -1 : currPartition.getNextIndex(currentCompositeIdx);
joinControl = new JoinControl(((HashJoinPOP)outgoingJoinBatch.getPopConfig()).getJoinControl());