Skip to content

Conversation

@zhzhan
Copy link
Contributor

@zhzhan zhzhan commented Sep 1, 2015

Throw error if the directory of a table is invalid, validated by either all files in the directory are partitioned, or none of them are partitioned.

The consistency of detailed partition spec is validated by existing parsePartitionColumn.

@SparkQA
Copy link

SparkQA commented Sep 1, 2015

Test build #41855 has finished for PR 8547 at commit be5522d.

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

Copy link
Contributor

Choose a reason for hiding this comment

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

No. We need to preserve files like Parquet summary files (_metadata and _common_metadata).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the comments. It seems there is a lot of corner cases to be covered from the test case. for example 1st is valid, but 2nd is not:
1st:
"hdfs://host:9000/path/_temporary",
"hdfs://host:9000/path/a=10/b=20",
"hdfs://host:9000/path/_temporary/path",
2nd:
"hdfs://host:9000/path/_temporary",
"hdfs://host:9000/path/a=10/b=20",
"hdfs://host:9000/path/path1",
Adding an PartitionValues.empty does not solve the problem. Will close this PR, and investigate other approaches.

@zhzhan
Copy link
Contributor Author

zhzhan commented Sep 1, 2015

Adding an PartitionValues.empty does not cover all problems. Will close this PR, and investigate other approaches.

@zhzhan zhzhan closed this Sep 1, 2015
asfgit pushed a commit that referenced this pull request Nov 3, 2015
…the dir structure is invalid

JIRA: https://issues.apache.org/jira/browse/SPARK-10304

This patch detects if the structure of partition directories is not valid.

The test cases are from #8547. Thanks zhzhan.

cc liancheng

Author: Liang-Chi Hsieh <[email protected]>

Closes #8840 from viirya/detect_invalid_part_dir.
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