Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/execution/physical_plan/plan_asof_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,13 @@ PhysicalPlanGenerator::PlanAsOfLoopJoin(LogicalComparisonJoin &op, PhysicalOpera
asof_idx = i;
arg_min_max = "arg_min";
break;
default:
case ExpressionType::COMPARE_EQUAL:
case ExpressionType::COMPARE_NOTEQUAL:
case ExpressionType::COMPARE_DISTINCT_FROM:
break;
default:
// Unsupported NLJ comparison
return nullptr;
}
}

Expand Down
9 changes: 9 additions & 0 deletions test/sql/join/asof/test_asof_join.test
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ FROM trades t ASOF JOIN prices p
----
2020-01-01 00:00:03 1 42

# NLJ does not support IS NOT DISTINCT FROM
query II
EXPLAIN
SELECT t.*, p.price
FROM trades t ASOF JOIN prices p
ON t.symbol IS NOT DISTINCT FROM p.symbol AND t.when >= p.when;
----
physical_plan <!REGEX>:.*NESTED_LOOP_JOIN.*

# Ignore non-join conditions
query II
SELECT p.ts, e.value
Expand Down
Loading