GitHub user actuaryzhang opened a pull request:
https://github.com/apache/spark/pull/17017
[SPARK-19682][SparkR] Issue warning (or error) when subset method "[["
takes vector index
## What changes were proposed in this pull request?
The `[[` method is supposed to take a single index and return a column.
This is different from base R which takes a vector index. We should check for
this and issue warning or error when vector index is supplied (which is very
likely given the behavior in base R).
Currently I'm issuing a warning message and just take the first element of
the vector index. We could change this to an error it that's better.
## How was this patch tested?
new tests
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/actuaryzhang/spark sparkRSubsetter
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/17017.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 #17017
----
commit 0f79df3162d9cc6cdfa0cfee0f3b2f0efa88ebaa
Author: actuaryzhang <[email protected]>
Date: 2017-02-21T18:38:11Z
add check for length of subset index
commit 66888b6ca30fdc76565fcaf60fdf98366a5b49c9
Author: actuaryzhang <[email protected]>
Date: 2017-02-21T18:57:09Z
update test
----
---
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]