Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,11 @@ class PlanParserSuite extends AnalysisTest {
$"u.a",
None,
Inner).select(star()))
}
}

test("asof join - explicit left join type with on condition") {
withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {
assertEqual(
"select * from t left asof join u match_condition (t.a >= u.a) on t.b = u.b",
AsOfJoin.fromMatchCondition(
Expand All @@ -1067,7 +1071,11 @@ class PlanParserSuite extends AnalysisTest {
$"u.a",
Some($"t.b" === $"u.b"),
LeftOuter).select(star()))
}
}

test("asof join - using with a single join column") {
withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {
assertEqual(
"select * from t asof join u match_condition (t.a >= u.a) using (b)",
AsOfJoin.fromMatchCondition(
Expand All @@ -1079,7 +1087,11 @@ class PlanParserSuite extends AnalysisTest {
None,
Inner,
usingColumns = Some(Seq("b"))).select(star()))
}
}

test("asof join - using with multiple join columns") {
withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {
assertEqual(
"select * from t asof join u match_condition (t.a >= u.a) using (a, b)",
AsOfJoin.fromMatchCondition(
Expand All @@ -1091,7 +1103,11 @@ class PlanParserSuite extends AnalysisTest {
None,
Inner,
usingColumns = Some(Seq("a", "b"))).select(star()))
}
}

test("asof join - less than or equal match operator") {
withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {
Comment thread
LukaZdravic marked this conversation as resolved.
assertEqual(
"select * from t asof join u match_condition (u.a <= t.a)",
AsOfJoin.fromMatchCondition(
Expand All @@ -1102,7 +1118,11 @@ class PlanParserSuite extends AnalysisTest {
$"t.a",
None,
Inner).select(star()))
}
}

test("asof join - greater than match operator") {
withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {
Comment thread
LukaZdravic marked this conversation as resolved.
assertEqual(
"select * from t asof join u match_condition (t.a > u.a)",
AsOfJoin.fromMatchCondition(
Expand All @@ -1113,7 +1133,11 @@ class PlanParserSuite extends AnalysisTest {
$"u.a",
None,
Inner).select(star()))
}
}

test("asof join - less than match operator") {
withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {
Comment thread
LukaZdravic marked this conversation as resolved.
assertEqual(
"select * from t asof join u match_condition (t.a < u.a)",
AsOfJoin.fromMatchCondition(
Expand All @@ -1124,7 +1148,11 @@ class PlanParserSuite extends AnalysisTest {
$"u.a",
None,
Inner).select(star()))
}
}

test("asof join - explicit inner join type") {
withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {
Comment thread
LukaZdravic marked this conversation as resolved.
assertEqual(
"select * from t inner asof join u match_condition (t.a >= u.a)",
AsOfJoin.fromMatchCondition(
Expand All @@ -1135,7 +1163,11 @@ class PlanParserSuite extends AnalysisTest {
$"u.a",
None,
Inner).select(star()))
}
}

test("asof join - explicit left outer join type") {
withSQLConf(SQLConf.SQL_ASOF_JOIN_ENABLED.key -> "true") {
Comment thread
LukaZdravic marked this conversation as resolved.
assertEqual(
"select * from t left outer asof join u match_condition (t.a >= u.a)",
AsOfJoin.fromMatchCondition(
Expand Down