Skip to content

Conversation

@cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

The root cause is in MapObjects. Its parameter loopVar is not declared as child, but sometimes can be same with lambdaFunction(e.g. the function that takes loopVar and produces lambdaFunction may be identity), which is a child. This brings trouble when call withNewChildren, it may mistakenly treat loopVar as a child and cause IndexOutOfBoundsException: 0 later.

This PR fixes this bug by simply pulling out the paremters from LambdaVariable and pass them to MapObjects directly.

How was this patch tested?

new test in DatasetAggregatorSuite

@cloud-fan
Copy link
Contributor Author

cc @yhuai @liancheng @clockfly

@hvanhovell
Copy link
Contributor

Is this PR #13811 related?

@SparkQA
Copy link

SparkQA commented Jun 22, 2016

Test build #61003 has finished for PR 13835 at commit 447ddcd.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Jun 27, 2016

Test build #61302 has finished for PR 13835 at commit 447ddcd.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@liancheng
Copy link
Contributor

LGTM, merging to master and branch-2.0.

asfgit pushed a commit that referenced this pull request Jun 28, 2016
## What changes were proposed in this pull request?

The root cause is in `MapObjects`. Its parameter `loopVar` is not declared as child, but sometimes can be same with `lambdaFunction`(e.g. the function that takes `loopVar` and produces `lambdaFunction` may be `identity`), which is a child. This brings trouble when call `withNewChildren`, it may mistakenly treat `loopVar` as a child and cause `IndexOutOfBoundsException: 0` later.

This PR fixes this bug by simply pulling out the paremters from `LambdaVariable` and pass them to `MapObjects` directly.

## How was this patch tested?

new test in `DatasetAggregatorSuite`

Author: Wenchen Fan <wenchen@databricks.com>

Closes #13835 from cloud-fan/map-objects.

(cherry picked from commit 8a977b0)
Signed-off-by: Cheng Lian <lian@databricks.com>
@asfgit asfgit closed this in 8a977b0 Jun 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants