GitHub user mgaido91 opened a pull request:

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

    [SPARK-25371][ML] VectorAssembler should not fail with empty inputCols

    ## 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 has been already introduced in 
2.3.0, so I don't think it makes sense to revert the change - which may break 
users' application on upgrade, though - and it causes `VectorAssembler` to fail 
when an empty `inputCols` is defined.
    
    The PR adds an extra check in `VectorAssembler` which prevents the failure 
in the above mentioned case.
    
    ## 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

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

    https://github.com/apache/spark/pull/22373.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 #22373
    
----
commit 7bc026e364771c596b80a5ab22b4d1eebe04f3f3
Author: Marco Gaido <marcogaido91@...>
Date:   2018-09-09T12:54:20Z

    [SPARK-25371][SQL] VectorAssembler shpuld not fail with empty inputCols

----


---

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

Reply via email to