diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala index 7b451baaa02b9..883a97ba967c1 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala @@ -310,15 +310,13 @@ trait CheckAnalysis extends PredicateHelper { failAnalysis( s""" |Hive support is required to select over the following tables: - |${s.catalogTable.identifier} - """.stripMargin) + | ${s.catalogTable.identifier}""".stripMargin) case InsertIntoTable(s: SimpleCatalogRelation, _, _, _, _) => failAnalysis( s""" |Hive support is required to insert into the following tables: - |${s.catalogTable.identifier} - """.stripMargin) + | ${s.catalogTable.identifier}""".stripMargin) case o if !o.resolved => failAnalysis( diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala index 5d45cfb501c73..d9c91016b3944 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala @@ -1179,11 +1179,11 @@ class DDLSuite extends QueryTest with SharedSQLContext with BeforeAndAfterEach { var message = intercept[AnalysisException] { sql(s"INSERT OVERWRITE TABLE $tabName SELECT 1, 'a'") }.getMessage - assert(message.contains("Please enable Hive support when inserting the regular tables")) + assert(message.contains("Hive support is required to insert into the following tables:")) message = intercept[AnalysisException] { sql(s"SELECT * FROM $tabName") }.getMessage - assert(message.contains("Please enable Hive support when selecting the regular tables")) + assert(message.contains("Hive support is required to select over the following tables:")) } } @@ -1205,11 +1205,11 @@ class DDLSuite extends QueryTest with SharedSQLContext with BeforeAndAfterEach { var message = intercept[AnalysisException] { sql(s"INSERT OVERWRITE TABLE $tabName SELECT 1, 'a'") }.getMessage - assert(message.contains("Please enable Hive support when inserting the regular tables")) + assert(message.contains("Hive support is required to insert into the following tables:")) message = intercept[AnalysisException] { sql(s"SELECT * FROM $tabName") }.getMessage - assert(message.contains("Please enable Hive support when selecting the regular tables")) + assert(message.contains("Hive support is required to select over the following tables:")) } } }