GitHub user hvanhovell opened a pull request:

    [SPARK-23951][SQL] Use actual java class instead of string representation.

    ## What changes were proposed in this pull request?
    This PR slightly refactors the newly added `ExprValue` API by quite a bit. 
The following changes are introduced:
    1. `ExprValue` now uses the actual class instead of the class name as its 
type. This should give some more flexibility with generating code in the future.
    2. Renamed `StatementValue` to `SimpleExprValue`. The statement concept is 
broader then an expression (untyped and it cannot be on the right hand side of 
an assignment), and this was not really what we were using it for. I have added 
a top level `JavaCode` trait that can be used in the future to reinstate (no 
pun intended) a statement a-like code fragment.
    3. Added factory methods to the `JavaCode` companion object to make it 
slightly less verbose to create `JavaCode`/`ExprValue` objects. This is also 
what makes the diff quite large.
    4. Added one more factory method to `ExprCode` to make it easier to create 
code-less expressions.
    ## How was this patch tested?
    Existing tests.

You can merge this pull request into a Git repository by running:

    $ git pull SPARK-23951

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #21026
commit 821e08a988e81b389d454eca01f0cd0b3e3c9463
Author: Herman van Hovell <hvanhovell@...>
Date:   2018-04-10T13:55:30Z

    Use actual java class instead of string representation.



To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to