You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "panbingkun (via GitHub)" <gi...@apache.org> on 2023/09/11 01:49:15 UTC

[GitHub] [spark] panbingkun commented on a diff in pull request #42797: [SPARK-45068][SQL] Make math function output column name displayed in upper-cased style

panbingkun commented on code in PR #42797:
URL: https://github.com/apache/spark/pull/42797#discussion_r1320918163


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala:
##########
@@ -880,7 +885,7 @@ case class IntegralDivide(
     DecimalType.bounded(if (intDig == 0) 1 else intDig, 0)
   }
 
-  override def sqlOperator: String = "div"
+  override def sqlOperator: String = "DIV"

Review Comment:
   If we change it to lowercase, there will be approximately `55` file changes, as shown in:
   
   The original intention of this PR is to maintain consistency, whether it is lowercase or uppercase (Currently, it seems that using uppercase letters to display mathematical function names is more in line with common practice). Two confusing cases are described in the PR.
   - Inconsistent case of alias
      <img width="560" alt="image" src="https://github.com/apache/spark/assets/15246973/5e073f37-0767-4922-b62a-b3a54fb9fb80">
   
   - The number of function parameters also leads to inconsistent capitalization
   
   
   



-- 
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