GitHub user WeichenXu123 opened a pull request:
https://github.com/apache/spark/pull/14629
[SPARK-17046][SQL] prevent_user_call_df_select_will_empty_paramlist
## What changes were proposed in this pull request?
We can see the DataFrame API:
`def select(col: String, cols: String*)`
such definition can prevent user to call `select` in such way: `df.select(
)`
but, currently we can still use `df.select( )` and pass compiling,
because it match the API
`def select(cols: Column*)`
so, my modification is, add an API such as:
`def select(col: Column, cols: Column*)`
and change `def select(cols: Column*)` into `private[spark] def
select(cols: Column*)`
so that the public `select` API can only be called with non-empty param
list.
## How was this patch tested?
Existing test.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/WeichenXu123/spark
prevent_user_call_df_select_will_empty_paramlist
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/14629.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 #14629
----
commit 1179249290a36ce3946af2e8ea030a837bf8c712
Author: WeichenXu <[email protected]>
Date: 2016-08-12T09:40:23Z
prevent_user_call_df_select_will_empty_paramlist
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]