Skip to content

Commit

Permalink
spark assert_true function support
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoyangxiaozhu committed Jun 5, 2024
1 parent a07e3b8 commit 7e59e12
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,13 @@ class ScalarFunctionsValidateSuite extends FunctionsValidateTest {
}
}

test("Test raise_error function") {
runQueryAndCompare("""SELECT assert_true(1 > 0), l_orderkey
| from lineitem limit 100""".stripMargin) {
checkGlutenOperatorMatch[ProjectExecTransformer]
}
}

testWithSpecifiedSparkVersion("Test url_decode function", Some("3.4")) {
withTempPath {
path =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ object ExpressionMappings {
Sig[MonotonicallyIncreasingID](MONOTONICALLY_INCREASING_ID),
Sig[SparkPartitionID](SPARK_PARTITION_ID),
Sig[WidthBucket](WIDTH_BUCKET),
Sig[AssertTrue](ASSERT_TRUE),
// Decimal
Sig[UnscaledValue](UNSCALED_VALUE),
// Generator function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ object ExpressionNames {
final val SPARK_PARTITION_ID = "spark_partition_id"
final val MONOTONICALLY_INCREASING_ID = "monotonically_increasing_id"
final val WIDTH_BUCKET = "width_bucket"
final val ASSERT_TRUE = "assert_true"

// Directly use child expression transformer
final val KNOWN_NULLABLE = "known_nullable"
Expand Down

0 comments on commit 7e59e12

Please sign in to comment.