Skip to content

Commit 268787a

Browse files
xiaoxmengfacebook-github-bot
authored andcommitted
fix: Fix lookup input column naming and deduplicate input columns (facebookincubator#16205)
Summary: Fix lookup input column naming: In IndexLookupJoin.cpp, the lookup input column was incorrectly using indexKeyName (the index table's column name) instead of probeKeyName (the probe side's column name). This caused column name mismatches when the probe and index tables have different column names for the same join key. The fix ensures the lookup input type uses probe side column names, which are then mapped to index column names through lookupInputProjections_. Deduplicate lookup input columns: When the same input column is used in multiple join conditions (e.g., a column used for both lower and upper bounds in a BETWEEN condition, or the same column appearing in multiple conditions), it was being added multiple times to inputType_, causing duplicate columns in the row type. Added folly::F14FastSet<std::string> lookupInputColumnSet to track seen columns and only add each column once to the lookup input. Replaces all `VELOX_CHECK*` macros with their `SS_CHECK*` equivalents in `SequenceStorageIndexSource.cpp` to use the Sequence Storage-specific exception handling macros for better error categorization and consistency. bypass-github-export-checks Reviewed By: breeze1990, ximyu Differential Revision: D92024520
1 parent da0d2fd commit 268787a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

velox/exec/IndexLookupJoin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ void IndexLookupJoin::initLookupInput() {
310310
indexKeyType->toString(),
311311
probeKeyType->toString());
312312
addLookupInputColumn(
313-
indexKeyName,
313+
probeKeyName,
314314
probeKeyType,
315315
probeKeyChannel,
316316
lookupInputNames,

0 commit comments

Comments
 (0)