You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Abhishek Verma (JIRA)" <ji...@apache.org> on 2018/11/13 14:40:00 UTC

[jira] [Created] (SPARK-26039) Reading an empty folder as ORC causes an Analysis Exception

Abhishek Verma created SPARK-26039:
--------------------------------------

             Summary: Reading an empty folder as ORC causes an Analysis Exception
                 Key: SPARK-26039
                 URL: https://issues.apache.org/jira/browse/SPARK-26039
             Project: Spark
          Issue Type: Bug
          Components: Build
    Affects Versions: 2.3.0
            Reporter: Abhishek Verma


{{val df = spark.read.format("orc").load(orcFolderPath) }}

 

{{org.apache.spark.sql.AnalysisException: Unable to infer schema for ORC. It must be specified manually.; at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$7.apply(DataSource.scala:185) at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$7.apply(DataSource.scala:185) at scala.Option.getOrElse(Option.scala:121) at org.apache.spark.sql.execution.datasources.DataSource.getOrInferFileFormatSchema(DataSource.scala:184) at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:373) at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:223) at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:211) at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:178) ... 49 elided}}

 

{{try { spark.read.format("orc").load(path) } catch { case ex: org.apache.spark.sql.AnalysisException => { null } }}}

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org