Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/15513
  
    @gatorsmaile it seems foldable is already being used to check if the given 
expression is a literal or not in a lot of expressions here. For example, some 
of expressions throw the exception "... should be a literal" if the expression 
is not foldable.
    
    Also, I think we should fix the expressions (I will raise a separate JIRA 
and PR) because some of them look needing to check if it is actually a literal 
or not (not foldable or not). I think I can differenciate it from literal in 
another PR. I don't want to fix some codes here. 
    
    In addition, if you check the codes, it seems really okay to call it 
literal in most cases. I don't think `an expression that evaluates to a 
constant` is a minimised form or concise when users actually just put a literal 
or constant as a argument.
    
    Please let me make another PR to make it consistent and deal with it. It 
_seems_ already inconsistent to differentiate an expression allowing constant 
folding from a literal.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to