Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
vkorukanti committed Jan 12, 2024
1 parent 39c1502 commit 0a18d35
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,59 @@ class PartitionPruningSuite extends AnyFunSuite with TestUtils {
) -> (
predicate("=", col("as_value"), ofString("200")),
Seq()
)
),

(
"partition pruning: predicate with (unsupported expr OR data predicate)",
or(
predicate("=", col("as_value"), ofString("1")), // data col filter
predicate("unsupported") // unsupported expression
)
) -> (
or(
predicate("=", col("as_value"), ofString("1")), // data col filter
predicate("unsupported") // unsupported expression
),
Seq((18878, "0"), (18878, "1"), (null, "2"))
),

(
"partition pruning: predicate with (unsupported expr OR partition predicate)",
or(
predicate("=", col("as_float"), ofFloat(1)), // partition col filter
predicate("unsupported") // unsupported expression
)
) -> (
or(
predicate("=", col("as_float"), ofFloat(1)), // partition col filter
predicate("unsupported") // unsupported expression
),
Seq((18878, "0"), (18878, "1"), (null, "2"))
),
(
"partition pruning: predicate with (unsupported expr AND data predicate)",
and(
predicate("=", col("as_value"), ofString("1")), // data col filter
predicate("unsupported") // unsupported expression
)
) -> (
and(
predicate("=", col("as_value"), ofString("1")), // data col filter
predicate("unsupported") // unsupported expression
),
Seq((18878, "0"), (18878, "1"), (null, "2"))
),

(
"partition pruning: predicate with (unsupported expr AND partition predicate)",
and(
predicate("=", col("as_float"), ofFloat(1)), // partition col filter
predicate("unsupported") // unsupported expression
)
) -> (
predicate("unsupported"), // unsupported expression
Seq((18878, "1"))
),
)

combinationTestCases.foreach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ trait TestUtils extends Assertions {
val scan = scanBuilder.build()

if (filter != null) {
val actRemainingPredicate = scan.getRemainingFilter()
val actRemainingPredicate = scan.getRemainingFilter(defaultTableClient)
assert(
actRemainingPredicate.toString === Optional.ofNullable(expectedRemainingFilter).toString)
}
Expand Down

0 comments on commit 0a18d35

Please sign in to comment.