You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "itholic (via GitHub)" <gi...@apache.org> on 2023/06/08 10:02:06 UTC
[GitHub] [spark] itholic commented on a diff in pull request #41511: [SPARK-43613][PS][CONNECT] Enable `pyspark.pandas.spark.functions.covar` in Spark Connect
itholic commented on code in PR #41511:
URL: https://github.com/apache/spark/pull/41511#discussion_r1222760105
##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -1686,6 +1692,11 @@ class SparkConnectPlanner(val session: SparkSession) {
case other => throw InvalidPlanInput(s"$field should be a literal boolean, but got $other")
}
+ private def extractInteger(expr: Expression, field: String): Int = expr match {
+ case Literal(int: Int, IntegerType) => int
+ case other => throw InvalidPlanInput(s"$field should be a literal integer, but got $other")
Review Comment:
Btw, maybe in the future we should also convert these kind of errors into error class. Let's leave it as it is for now since they're not user-facing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org