MaxGekk commented on a change in pull request #25942: [SPARK-29242][SQL][TEST] 
Check results of expression examples
URL: https://github.com/apache/spark/pull/25942#discussion_r328868922
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
 ##########
 @@ -448,7 +448,7 @@ case class IntegralDivide(left: Expression, right: 
Expression) extends DivModLik
   usage = "expr1 _FUNC_ expr2 - Returns the remainder after `expr1`/`expr2`.",
   examples = """
     Examples:
-      > SELECT 2 _FUNC_ 1.8;
 
 Review comment:
   Unfortunately, using of the `_FUNC_` template is impossible here because the 
expression has 2 function names `%` and `mod` but one of the example always 
causes an error:
   ```sql
   spark-sql> SELECT 2 mod 1.8;
   Error in query: 
   extraneous input '1.8' expecting <EOF>(line 1, pos 13)
   
   == SQL ==
   SELECT 2 mod 1.8
   -------------^^^
   ```
   ```sql
   spark-sql> SELECT %(2, 1.8);
   Error in query: 
   no viable alternative at input 'SELECT %'(line 1, pos 7)
   
   == SQL ==
   SELECT %(2, 1.8)
   -------^^^
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to