it is definitively a bug, sqlContext.parquetFile should take both dir and
single file as parameter.
this if-check for isDir make no sense after this commit
https://github.com/apache/spark/pull/1370/files#r14967550
i opened a ticket for this issue
https://issues.apache.org/jira/browse/SPARK-3138
I'm using CDH 5.1 with spark 1.0.
When I try to run Spark SQL following the Programming Guide
val parquetFile = sqlContext.parquetFile(path)
If the "path" is a file, it throws an exception:
Exception in thread "main" java.lang.IllegalArgumentException:
Expected hdfs://*/file.parquet for be a d