Skip to content

Conversation

@maropu
Copy link
Member

@maropu maropu commented Aug 20, 2020

What changes were proposed in this pull request?

In case that a last SQLQueryTestSuite test run is killed, it will fail in a next run because of a following reason:

[info] org.apache.spark.sql.SQLQueryTestSuite *** ABORTED *** (17 seconds, 483 milliseconds)
[info]   org.apache.spark.sql.AnalysisException: Can not create the managed table('`testdata`'). The associated location('file:/Users/maropu/Repositories/spark/spark-master/sql/core/spark-warehouse/org.apache.spark.sql.SQLQueryTestSuite/testdata') already exists.;
[info]   at org.apache.spark.sql.catalyst.catalog.SessionCatalog.validateTableLocation(SessionCatalog.scala:355)
[info]   at org.apache.spark.sql.execution.command.CreateDataSourceTableAsSelectCommand.run(createDataSourceTables.scala:170)
[info]   at org.apache.spark.sql.execution.command.DataWritingCommandExec.sideEffectResult$lzycompute(commands.scala:108)

This PR intends to add code to deletes orphan directories under a warehouse dir in SQLQueryTestSuite before creating test tables.

Why are the changes needed?

To improve test convenience

Does this PR introduce any user-facing change?

No

How was this patch tested?

Manually checked

@SparkQA
Copy link

SparkQA commented Aug 20, 2020

Test build #127684 has finished for PR 29488 at commit 4681e62.

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

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thanks, @maropu .
Merged to master for Apache Spark 3.1.0 on December 2020.

@maropu
Copy link
Member Author

maropu commented Aug 20, 2020

Thank you for your quick response, @dongjoon-hyun !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants