Uh oh!
There was an error while loading. Please reload this page.
[SPARK-16126] [SQL] Better Error Message When using DataFrameReader without path - #13837
[SPARK-16126] [SQL] Better Error Message When using DataFrameReader without path#13837gatorsmile wants to merge 10 commits into
path#13837Conversation
pathpathSparkQA
commented
Jun 22, 2016
Test build #61016 has finished for PR 13837 at commit
|
SparkQA
commented
Jun 22, 2016
Test build #61044 has started for PR 13837 at commit |
gatorsmile
commented
Jun 22, 2016
Weird? How to stop this test case run? |
gatorsmile
commented
Jun 22, 2016
retest this please |
SparkQA
commented
Jun 23, 2016
Test build #61074 has finished for PR 13837 at commit
|
gatorsmile
commented
Jun 23, 2016
| val availableCodecs = shortParquetCompressionCodecNames.keys.map(_.toLowerCase) | ||
| throw new IllegalArgumentException(s"Codec [$codecName] " + | ||
| s"is not available. Available codecs are ${availableCodecs.mkString(", ")}.") | ||
| s"is not available. Known codecs are ${availableCodecs.mkString(", ")}.") |
There was a problem hiding this comment.
Just to make it consistent with the output of the other cases. See the code:
There was a problem hiding this comment.
Available was intentionally used because Parquet only supports snappy, gzip or lzo whereas Known was used for text-based ones (Please see #10805 (comment)) as they support compression codecs including other codecs but that lists the known ones.
SparkQA
commented
Nov 12, 2016
Test build #68556 has finished for PR 13837 at commit
|
SparkQA
commented
Nov 12, 2016
Test build #68567 has finished for PR 13837 at commit
|
SparkQA
commented
Nov 13, 2016
Test build #68579 has finished for PR 13837 at commit
|
| expect_error(read.df(source = "json"), | ||
| paste("Error in loadDF : analysis error - Unable to infer schema for JSON at .", | ||
| "It must be specified manually")) | ||
| paste("Error in loadDF : illegal argument - 'path' is not specified")) |
There was a problem hiding this comment.
I recall this test is intentionally testing without path argument?
cc @HyukjinKwon
There was a problem hiding this comment.
Thanks for cc'ing me. Yes, I did. It seems the changes are reasonable as it seems this checking applies to the data sources that need path.
| val equality = sparkSession.sessionState.conf.resolver | ||
| StructType(schema.filterNot(f => partitionColumns.exists(equality(_, f.name)))) | ||
| }.orElse { | ||
| if (allPaths.isEmpty && !format.isInstanceOf[TextFileFormat]) { |
There was a problem hiding this comment.
Hi @gatorsmile, would this be better if we explain here text data source is excluded because text datasource always uses a schema consisting of a string field if the schema is not explicitly given?
BTW, should we maybe change text.TextFileFormat to TextFileFormathttps://github.com/gatorsmile/spark/blob/45110370fb1889f244a6750ef2a18dbc9f1ba9c2/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala#L139 ?
felixcheung
commented
Mar 11, 2017
hi - where are we on this one? |
HyukjinKwon
commented
May 11, 2017
(gentle ping) |
## What changes were proposed in this pull request? This PR proposes to close PRs ... - inactive to the review comments more than a month - WIP and inactive more than a month - with Jenkins build failure but inactive more than a month - suggested to be closed and no comment against that - obviously looking inappropriate (e.g., Branch 0.5) To make sure, I left a comment for each PR about a week ago and I could not have a response back from the author in these PRs below: Closesapache#11129Closesapache#12085Closesapache#12162Closesapache#12419Closesapache#12420Closesapache#12491Closesapache#13762Closesapache#13837Closesapache#13851Closesapache#13881Closesapache#13891Closesapache#13959Closesapache#14091Closesapache#14481Closesapache#14547Closesapache#14557Closesapache#14686Closesapache#15594Closesapache#15652Closesapache#15850Closesapache#15914Closesapache#15918Closesapache#16285Closesapache#16389Closesapache#16652Closesapache#16743Closesapache#16893Closesapache#16975Closesapache#17001Closesapache#17088Closesapache#17119Closesapache#17272Closesapache#17971 Added: Closesapache#17778Closesapache#17303Closesapache#17872 ## How was this patch tested? N/A Author: hyukjinkwon <gurwls223@gmail.com> Closesapache#18017 from HyukjinKwon/close-inactive-prs.
What changes were proposed in this pull request?
When users do not specify the path in
DataFrameReaderAPIs, it can get a confusing error message. For example,Error message:
After the fix, the error message will be like:
Another major goal of this PR is to add test cases for the latest changes in #13727.
prevent all column partitioningHow was this patch tested?
Test cases are added.