You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2016/06/19 07:09:05 UTC
[jira] [Created] (SPARK-16054) Verification of DataFrameReader API
Usage
Xiao Li created SPARK-16054:
-------------------------------
Summary: Verification of DataFrameReader API Usage
Key: SPARK-16054
URL: https://issues.apache.org/jira/browse/SPARK-16054
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 2.0.0
Reporter: Xiao Li
Below are potential user errors when using DataFrameReader APIs
{noformat}
// not allowed to specify format when reading tables from catalog
spark.read.format("parquet").table(tableName)
// not allowed to specify schema when reading tables from catalog
val schema = StructType(StructField("c1", IntegerType) :: Nil)
spark.read.schema(schema).table(tableName)
// not allowed to specify options when reading tables from catalog
spark.read.options(Map("header" -> "true", "mode" -> "dropmalformed")).table(tableName)
// not allowed to specify the format more than once
spark.read.format(format).json(path.getCanonicalPath)
// not allowed to specify schema more than once.
spark.read.schema(schema1).schema(schema2).json(path.getCanonicalPath)
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org