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_r328914737
 
 

 ##########
 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:
   hmm, probably I don't understand you. Do you want to show not working 
example to users? 
   For `MOD`, the examples (after replacing `_FUNC_` by `MOD`) are:
   ```sql
       Examples:
         > SELECT 2 MOD 1.8;
          0.2
         > SELECT MOD(2, 1.8);
          0.2
   ```
   where the first one is incorrect.
   For `%`, both are correct:
   ```sql
       Examples:
         > SELECT 2 % 1.8;
          0.2
         > SELECT MOD(2, 1.8);
          0.2
   ```
   Using `_FUNC_` for the first example, or for the second one, or for both 
always produce an incorrect example. For the examples , we cannot use `_FUNC_` 
at all. 

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