[ https://issues.apache.org/jira/browse/SPARK-28436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon updated SPARK-28436: --------------------------------- Summary: Throw better exception when datasource's schema is not equal to user-specific shema (was: [SQL] Throw better exception when datasource's schema is not equal to user-specific shema) > Throw better exception when datasource's schema is not equal to user-specific > shema > ----------------------------------------------------------------------------------- > > Key: SPARK-28436 > URL: https://issues.apache.org/jira/browse/SPARK-28436 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.3.0, 2.4.3 > Reporter: ShuMing Li > Priority: Minor > > When this exception is thrown, users cannot find what's the difference > between datasource's original schema and user-specific schema, and maybe very > confused when meet the exception below. > {code:java} > org.apache.spark.sql.AnalysisException: org.apache.spark.odps.datasource does > not allow user-specified schemas. > at > org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:347) > at > org.apache.spark.sql.execution.command.CreateDataSourceTableCommand.run(createDataSourceTables.scala:78) > at > org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70) > at > org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:68) > at > org.apache.spark.sql.execution.command.ExecutedCommandExec.executeCollect(commands.scala:79) > at org.apache.spark.sql.Dataset$$anonfun$6.apply(Dataset.scala:190) > at org.apache.spark.sql.Dataset$$anonfun$6.apply(Dataset.scala:190) > at org.apache.spark.sql.Dataset$$anonfun$52.apply(Dataset.scala:3270) > at > org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:83) > at org.apache.spark.sql.Dataset.withAction(Dataset.scala:3269) > at org.apache.spark.sql.Dataset.<init>(Dataset.scala:190) > at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:75) > at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:653) > at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:714) > {code} -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org