Skip to content

Commit b722806

Browse files
committed
Ignore examples for Remainder
1 parent f7caecd commit b722806

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ case class IntegralDivide(left: Expression, right: Expression) extends DivModLik
450450
Examples:
451451
> SELECT 2 _FUNC_ 1.8;
452452
0.2
453-
> SELECT _FUNC_(2, 1.8);
453+
> SELECT MOD(2, 1.8);
454454
0.2
455455
""")
456456
case class Remainder(left: Expression, right: Expression) extends DivModLike {

sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession {
122122
// `CASE WHEN ... THEN ... WHEN ... THEN ... END`
123123
"org.apache.spark.sql.catalyst.expressions.CaseWhen",
124124
// _FUNC_ is replaced by `locate` but `locate(... IN ...)` is not supported
125-
"org.apache.spark.sql.catalyst.expressions.StringLocate")
125+
"org.apache.spark.sql.catalyst.expressions.StringLocate",
126+
// _FUNC_ is replaced by `%` which causes a parsing error on `SELECT %(2, 1.8)`
127+
"org.apache.spark.sql.catalyst.expressions.Remainder")
126128
spark.sessionState.functionRegistry.listFunction().foreach { funcId =>
127129
val info = spark.sessionState.catalog.lookupFunctionInfo(funcId)
128130
val className = info.getClassName

0 commit comments

Comments
 (0)