Skip to content

Conversation

@sarutak
Copy link
Member

@sarutak sarutak commented Mar 11, 2017

What changes were proposed in this pull request?

When batches are executed with memory, console or foreach format, assertNotPartitioned will check whether output is not partitioned and throw AnalysisException in case it is.

But I wonder it's better to log warning rather than throw the exception because partitioning does not affect output for those formats but also does not bring any negative impacts.

Also, this assertion is not applied when the format is console. I think in this case too, we should assert that .

By fixing them, we can easily switch the format to memory or console for debug purposes.

How was this patch tested?

I tested manually for memory, foreach and console formats and confirm that warning is displayed.

@SparkQA
Copy link

SparkQA commented Mar 11, 2017

Test build #74357 has finished for PR 17252 at commit 7372aa5.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 14, 2017

Test build #74554 has finished for PR 17252 at commit 01ad04a.

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

@marmbrus
Copy link
Contributor

Thanks for working on this, but I think this is inconsistent with other APIs in Spark. Also for things like the foreach sink, you might actually be expecting the option to affect the partitioning for some correctness reason. As such I think we should close this issue.

@sarutak
Copy link
Member Author

sarutak commented Mar 23, 2017

Thanks for the comment. I understand the concern relevant to the consistency.

@sarutak sarutak closed this Mar 23, 2017
@sarutak sarutak deleted the SPARK-19913 branch June 4, 2021 20:45
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.

3 participants