GitHub user mgaido91 opened a pull request:

    https://github.com/apache/spark/pull/22391

    [SPARK-25371][SQL][BACKPORT-2.3] struct() should allow being called with 0 
args

    ## What changes were proposed in this pull request?
    
    SPARK-21281 introduced a check for the inputs of `CreateStructLike` to be 
non-empty. This means that `struct()`, which was previously considered valid, 
now throws an Exception.  This behavior change was introduced in 2.3.0. The 
change may break users' application on upgrade and it causes `VectorAssembler` 
to fail when an empty `inputCols` is defined.
    
    The PR removes the added check making `struct()` valid again.
    
    ## How was this patch tested?
    
    added UT


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

    $ git pull https://github.com/mgaido91/spark SPARK-25371_2.3

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

    https://github.com/apache/spark/pull/22391.patch

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

    This closes #22391
    
----
commit 66b6bd5b7e1538d60915b62fa1155dcd86f3411a
Author: Marco Gaido <marcogaido91@...>
Date:   2018-09-11T06:16:56Z

    [SPARK-25371][SQL] struct() should allow being called with 0 args
    
    SPARK-21281 introduced a check for the inputs of `CreateStructLike` to be 
non-empty. This means that `struct()`, which was previously considered valid, 
now throws an Exception.  This behavior change was introduced in 2.3.0. The 
change may break users' application on upgrade and it causes `VectorAssembler` 
to fail when an empty `inputCols` is defined.
    
    The PR removes the added check making `struct()` valid again.
    
    added UT
    
    Closes #22373 from mgaido91/SPARK-25371.
    
    Authored-by: Marco Gaido <marcogaid...@gmail.com>
    Signed-off-by: Wenchen Fan <wenc...@databricks.com>

----


---

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

Reply via email to