This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new d4277b8e783 [SPARK-44268][CORE][TEST][FOLLOWUP] Add test to generate `sql-error-conditions` doc automatic d4277b8e783 is described below commit d4277b8e78347fd4e3163c6218edc4675ebb6db2 Author: Jia Fan <fanjiaemi...@qq.com> AuthorDate: Fri Jul 7 11:58:23 2023 +0900 [SPARK-44268][CORE][TEST][FOLLOWUP] Add test to generate `sql-error-conditions` doc automatic ### What changes were proposed in this pull request? This is a follow up PR for #41813, change test to automatic generate `sql-error-conditions` doc. Like other GOLDEN_FILES test, if the doc not match will report a error during test. ### Why are the changes needed? 1. make sure the `error-classes.json` sync with doc 2. and developer sync doc easier. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? add new test. Closes #41865 from Hisoka-X/SPARK-44268_error_json_follow_up. Authored-by: Jia Fan <fanjiaemi...@qq.com> Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> --- .../src/main/resources/error/error-classes.json | 2 +- .../org/apache/spark/SparkThrowableSuite.scala | 219 +++++++++++++++---- ...sql-error-conditions-as-of-join-error-class.md} | 6 +- ...ror-conditions-datatype-mismatch-error-class.md | 5 - ...onsistent-behavior-cross-version-error-class.md | 19 -- ...ns-insert-column-arity-mismatch-error-class.md} | 2 + ...ons-insufficient-table-property-error-class.md} | 4 + ...ror-conditions-invalid-boundary-error-class.md} | 4 + ...onditions-invalid-default-value-error-class.md} | 4 + ...-error-conditions-invalid-format-error-class.md | 2 +- ...conditions-invalid-inline-table-error-class.md} | 4 + ...ns-invalid-lambda-function-call-error-class.md} | 8 +- ...s-invalid-limit-like-expression-error-class.md} | 4 + ...ditions-invalid-observed-metrics-error-class.md | 2 + ...ons-invalid-partition-operation-error-class.md} | 4 + ...-error-conditions-invalid-schema-error-class.md | 1 - ...r-conditions-invalid-sql-syntax-error-class.md} | 58 ++--- ...alid-time-travel-timestamp-expr-error-class.md} | 4 + ...ions-invalid-write-distribution-error-class.md} | 4 + ...ons-malformed-record-in-parsing-error-class.md} | 3 + ...r-conditions-missing-attributes-error-class.md} | 3 + ...conditions-not-a-constant-string-error-class.md | 2 + ...-conditions-not-allowed-in-from-error-class.md} | 4 + ...s-not-supported-in-jdbc-catalog-error-class.md} | 2 + ...conditions-unsupported-add-file-error-class.md} | 2 + ...tions-unsupported-default-value-error-class.md} | 6 +- ...r-conditions-unsupported-feature-error-class.md | 10 +- ...r-conditions-unsupported-insert-error-class.md} | 2 + ...ons-unsupported-merge-condition-error-class.md} | 2 + ...onditions-unsupported-overwrite-error-class.md} | 2 + docs/sql-error-conditions.md | 239 ++++++++++----------- 31 files changed, 406 insertions(+), 227 deletions(-) diff --git a/common/utils/src/main/resources/error/error-classes.json b/common/utils/src/main/resources/error/error-classes.json index 55fa2878e37..0afd103b565 100644 --- a/common/utils/src/main/resources/error/error-classes.json +++ b/common/utils/src/main/resources/error/error-classes.json @@ -1214,7 +1214,7 @@ }, "UNEXPECTED_TOKEN" : { "message" : [ - "Found the unexpected <token> in the format string; the structure of the format string must match: [MI|S] [$] [0|9|G|,]* [.|D] [0|9]* [$] [PR|MI|S]." + "Found the unexpected <token> in the format string; the structure of the format string must match: `[MI|S]` `[$]` `[0|9|G|,]*` `[.|D]` `[0|9]*` `[$]` `[PR|MI|S]`." ] }, "WRONG_NUM_DIGIT" : { diff --git a/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala b/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala index 034a782e533..0249cde5488 100644 --- a/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala +++ b/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala @@ -20,8 +20,10 @@ package org.apache.spark import java.io.File import java.nio.charset.StandardCharsets import java.nio.file.Files +import java.util.Locale import scala.util.Properties.lineSeparator +import scala.util.matching.Regex import com.fasterxml.jackson.annotation.JsonInclude.Include import com.fasterxml.jackson.core.JsonParser.Feature.STRICT_DUPLICATE_DETECTION @@ -45,6 +47,12 @@ class SparkThrowableSuite extends SparkFunSuite { SPARK_GENERATE_GOLDEN_FILES=1 build/sbt \ "core/testOnly *SparkThrowableSuite -- -t \"Error classes are correctly formatted\"" }}} + + To regenerate the error class document. Run: + {{{ + SPARK_GENERATE_GOLDEN_FILES=1 build/sbt \ + "core/testOnly *SparkThrowableSuite -- -t \"Error classes match with document\"" + }}} */ private val errorJsonFilePath = getWorkspaceFilePath( "common", "utils", "src", "main", "resources", "error", "error-classes.json") @@ -141,54 +149,179 @@ class SparkThrowableSuite extends SparkFunSuite { checkIfUnique(messageFormats) } - test("SPARK-44268: Error classes match with document") { - val sqlstateDoc = "sql-error-conditions-sqlstates.md" + test("Error classes match with document") { val errors = errorReader.errorInfoMap - val errorDocPaths = getWorkspaceFilePath("docs").toFile - .listFiles(_.getName.startsWith("sql-error-conditions-")) - .filter(!_.getName.equals(sqlstateDoc)) - .map(f => IOUtils.toString(f.toURI, StandardCharsets.UTF_8)).map(_.split("\n")) - // check the error classes in document should be in error-classes.json - val linkInDocRegex = "\\[(.*)\\]\\((.*)\\)".r - val commonErrorsInDoc = IOUtils.toString(getWorkspaceFilePath("docs", - "sql-error-conditions.md").toUri, StandardCharsets.UTF_8).split("\n") - .filter(_.startsWith("###")).map(s => s.replace("###", "").trim) - .filter(linkInDocRegex.findFirstMatchIn(_).isEmpty) - - commonErrorsInDoc.foreach(s => assert(errors.contains(s), - s"Error class: $s is not in error-classes.json")) - - val titlePrefix = "title:" - val errorsInDoc = errorDocPaths.map(lines => { - val errorClass = lines.filter(_.startsWith(titlePrefix)) - .map(s => s.replace("error class", "").replace(titlePrefix, "").trim).head - assert(errors.contains(errorClass), s"Error class: $errorClass is not in error-classes.json") - val subClasses = lines.filter(_.startsWith("##")).map(s => s.replace("##", "").trim) - .map { s => - assert(errors(errorClass).subClass.get.contains(s), - s"Error class: $errorClass does not contain sub class: $s in error-classes.json") - s - } - errorClass -> subClasses + + // the black list of error class name which should not add quote + val contentQuoteBlackList = Seq( + "INCOMPLETE_TYPE_DEFINITION.MAP", + "INCOMPLETE_TYPE_DEFINITION.STRUCT") + + def quoteParameter(content: String, errorName: String): String = { + if (contentQuoteBlackList.contains(errorName)) { + content + } else { + "<(.*?)>".r.replaceAllIn(content, (m: Regex.Match) => { + val matchStr = m.group(1) + if (matchStr.nonEmpty) { + s"`<$matchStr>`" + } else { + m.matched + } + }).replaceAll("%(.*?)\\$", "`\\%$1\\$`") + } + } + + val sqlStates = IOUtils.toString(getWorkspaceFilePath("docs", + "sql-error-conditions-sqlstates.md").toUri, StandardCharsets.UTF_8).split("\n") + .filter(_.startsWith("##")).map(s => { + + val errorHeader = s.split("[`|:|#|\\s]+").filter(_.nonEmpty) + val sqlState = errorHeader(1) + (sqlState, errorHeader.head.toLowerCase(Locale.ROOT) + "-" + sqlState + "-" + + errorHeader.takeRight(errorHeader.length - 2).mkString("-").toLowerCase(Locale.ROOT)) }).toMap - // check the error classes in error-classes.json should be in document - errors.foreach { e => - val errorClass = e._1 - val subClasses = e._2.subClass.getOrElse(Map.empty).keys.toSeq - if (subClasses.nonEmpty) { - assert(errorsInDoc.contains(errorClass), - s"Error class: $errorClass do not have sql-error-conditions sub doc, please create it") - val subClassesInDoc = errorsInDoc(errorClass) - subClasses.foreach { s => - assert(subClassesInDoc.contains(s), - s"Error class: $errorClass contains sub class: $s which is not in " + - s"sql-error-conditions sub doc") + def getSqlState(sqlState: Option[String]): String = { + if (sqlState.isDefined) { + val prefix = sqlState.get.substring(0, 2) + if (sqlStates.contains(prefix)) { + s"[SQLSTATE: ${sqlState.get}](sql-error-conditions-sqlstates.html#${sqlStates(prefix)})" + } else { + "SQLSTATE: " + sqlState.get + } + } else { + "SQLSTATE: none assigned" + } + } + + def getErrorPath(error: String): String = { + s"sql-error-conditions-${error.toLowerCase(Locale.ROOT).replaceAll("_", "-")}-error-class" + } + + def getHeader(title: String): String = { + s"""--- + |layout: global + |title: $title + |displayTitle: $title + |license: | + | Licensed to the Apache Software Foundation (ASF) under one or more + | contributor license agreements. See the NOTICE file distributed with + | this work for additional information regarding copyright ownership. + | The ASF licenses this file to You under the Apache License, Version 2.0 + | (the "License"); you may not use this file except in compliance with + | the License. You may obtain a copy of the License at + | + | http://www.apache.org/licenses/LICENSE-2.0 + | + | Unless required by applicable law or agreed to in writing, software + | distributed under the License is distributed on an "AS IS" BASIS, + | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + | See the License for the specific language governing permissions and + | limitations under the License. + |---""".stripMargin + } + + val sqlErrorParentDocContent = errors.toSeq.filter(!_._1.startsWith("_LEGACY_ERROR_TEMP_")) + .sortBy(_._1).map(error => { + val name = error._1 + val info = error._2 + if (info.subClass.isDefined) { + val title = s"[$name](${getErrorPath(name)}.html)" + s"""|### $title + | + |${getSqlState(info.sqlState)} + | + |${quoteParameter(info.messageTemplate, name)} + | + |For more details see $title + |""".stripMargin + } else { + s"""|### $name + | + |${getSqlState(info.sqlState)} + | + |${quoteParameter(info.messageTemplate, name)} + |""".stripMargin + } + }).mkString("\n") + + val sqlErrorParentDoc = + s"""${getHeader("Error Conditions")} + | + |This is a list of common, named error conditions returned by Spark SQL. + | + |Also see [SQLSTATE Codes](sql-error-conditions-sqlstates.html). + | + |$sqlErrorParentDocContent + |""".stripMargin + + errors.filter(_._2.subClass.isDefined).foreach(error => { + val name = error._1 + val info = error._2 + + val subErrorContent = info.subClass.get.toSeq.sortBy(_._1).map(subError => { + s"""|## ${subError._1} + | + |${quoteParameter(subError._2.messageTemplate, s"$name.${subError._1}")} + |""".stripMargin + }).mkString("\n") + + val subErrorDoc = + s"""${getHeader(name + " error class")} + | + |${getSqlState(info.sqlState)} + | + |${quoteParameter(info.messageTemplate, name)} + | + |This error class has the following derived error classes: + | + |$subErrorContent + |""".stripMargin + + val errorDocPath = getWorkspaceFilePath("docs", getErrorPath(name) + ".md") + val errorsInDoc = if (errorDocPath.toFile.exists()) { + IOUtils.toString(errorDocPath.toUri, StandardCharsets.UTF_8) + } else { + "" + } + if (regenerateGoldenFiles) { + if (subErrorDoc.trim != errorsInDoc.trim) { + logInfo(s"Regenerating sub error class document $errorDocPath") + if (errorDocPath.toFile.exists()) { + Files.delete(errorDocPath) + } + FileUtils.writeStringToFile( + errorDocPath.toFile, + subErrorDoc + lineSeparator, + StandardCharsets.UTF_8) } - } else if (!errorClass.startsWith("_LEGACY_ERROR_TEMP_")) { - assert(commonErrorsInDoc.contains(errorClass), - s"Error class: $errorClass is not in sql-error-conditions.md") + } else { + assert(subErrorDoc.trim == errorsInDoc.trim, + "The error class document is not up to date. Please regenerate it.") } + }) + + val parentDocPath = getWorkspaceFilePath("docs", "sql-error-conditions.md") + val commonErrorsInDoc = if (parentDocPath.toFile.exists()) { + IOUtils.toString(parentDocPath.toUri, StandardCharsets.UTF_8) + } else { + "" + } + if (regenerateGoldenFiles) { + if (sqlErrorParentDoc.trim != commonErrorsInDoc.trim) { + logInfo(s"Regenerating error class document $parentDocPath") + if (parentDocPath.toFile.exists()) { + Files.delete(parentDocPath) + } + FileUtils.writeStringToFile( + parentDocPath.toFile, + sqlErrorParentDoc + lineSeparator, + StandardCharsets.UTF_8) + } + } else { + assert(sqlErrorParentDoc.trim == commonErrorsInDoc.trim, + "The error class document is not up to date. Please regenerate it.") } } diff --git a/docs/sql-error-conditions-invalid-as-of-join.md b/docs/sql-error-conditions-as-of-join-error-class.md similarity index 95% rename from docs/sql-error-conditions-invalid-as-of-join.md rename to docs/sql-error-conditions-as-of-join-error-class.md index 39f190474e6..921c720d39a 100644 --- a/docs/sql-error-conditions-invalid-as-of-join.md +++ b/docs/sql-error-conditions-as-of-join-error-class.md @@ -19,7 +19,9 @@ license: | limitations under the License. --- -Invalid as-of join +SQLSTATE: none assigned + +Invalid as-of join. This error class has the following derived error classes: @@ -30,3 +32,5 @@ The input argument `tolerance` must be non-negative. ## TOLERANCE_IS_UNFOLDABLE The input argument `tolerance` must be a constant. + + diff --git a/docs/sql-error-conditions-datatype-mismatch-error-class.md b/docs/sql-error-conditions-datatype-mismatch-error-class.md index 6ec4f078950..3bd63925323 100644 --- a/docs/sql-error-conditions-datatype-mismatch-error-class.md +++ b/docs/sql-error-conditions-datatype-mismatch-error-class.md @@ -64,13 +64,11 @@ cannot cast `<srcType>` to `<targetType>`. ## CAST_WITH_CONF_SUGGESTION cannot cast `<srcType>` to `<targetType>` with ANSI mode on. - If you have to cast `<srcType>` to `<targetType>`, you can set `<config>` as `<configVal>`. ## CAST_WITH_FUNC_SUGGESTION cannot cast `<srcType>` to `<targetType>`. - To convert values from `<srcType>` to `<targetType>`, you can use the functions `<functionNames>` instead. ## CREATE_MAP_KEY_DIFF_TYPES @@ -176,11 +174,8 @@ A range window frame cannot be used in an unordered window specification. ## SEQUENCE_WRONG_INPUT_TYPES `<functionName>` uses the wrong parameter type. The parameter type must conform to: - 1. The start and stop expressions must resolve to the same type. - 2. If start and stop expressions resolve to the `<startType>` type, then the step expression must resolve to the `<stepType>` type. - 3. Otherwise, if start and stop expressions resolve to the `<otherStartType>` type, then the step expression must resolve to the same type. ## SPECIFIED_WINDOW_FRAME_DIFF_TYPES diff --git a/docs/sql-error-conditions-inconsistent-behavior-cross-version-error-class.md b/docs/sql-error-conditions-inconsistent-behavior-cross-version-error-class.md index 6c80b3846cf..7a8dfb525fb 100644 --- a/docs/sql-error-conditions-inconsistent-behavior-cross-version-error-class.md +++ b/docs/sql-error-conditions-inconsistent-behavior-cross-version-error-class.md @@ -28,55 +28,36 @@ This error class has the following derived error classes: ## DATETIME_PATTERN_RECOGNITION Spark >= 3.0: - Fail to recognize `<pattern>` pattern in the DateTimeFormatter. 1) You can set `<config>` to "LEGACY" to restore the behavior before Spark 3.0. 2) You can form a valid datetime pattern with the guide from '`<docroot>`/sql-ref-datetime-pattern.html'. ## PARSE_DATETIME_BY_NEW_PARSER Spark >= 3.0: - Fail to parse `<datetime>` in the new parser. You can set `<config>` to "LEGACY" to restore the behavior before Spark 3.0, or set to "CORRECTED" and treat it as an invalid datetime string. ## READ_ANCIENT_DATETIME Spark >= 3.0: - reading dates before 1582-10-15 or timestamps before 1900-01-01T00:00:00Z - from `<format>` files can be ambiguous, as the files may be written by - Spark 2.x or legacy versions of Hive, which uses a legacy hybrid calendar - that is different from Spark 3.0+'s Proleptic Gregorian calendar. - See more details in SPARK-31404. You can set the SQL config `<config>` or - the datasource option `<option>` to "LEGACY" to rebase the datetime values - w.r.t. the calendar difference during reading. To read the datetime values - as it is, set the SQL config or the datasource option to "CORRECTED". ## WRITE_ANCIENT_DATETIME Spark >= 3.0: - writing dates before 1582-10-15 or timestamps before 1900-01-01T00:00:00Z - into `<format>` files can be dangerous, as the files may be read by Spark 2.x - or legacy versions of Hive later, which uses a legacy hybrid calendar that - is different from Spark 3.0+'s Proleptic Gregorian calendar. See more - details in SPARK-31404. You can set `<config>` to "LEGACY" to rebase the - datetime values w.r.t. the calendar difference during writing, to get maximum - interoperability. Or set the config to "CORRECTED" to write the datetime - values as it is, if you are sure that the written files will only be read by - Spark 3.0+ or other systems that use Proleptic Gregorian calendar. diff --git a/docs/sql-error-conditions-insert-column-arity-mismatch.md b/docs/sql-error-conditions-insert-column-arity-mismatch-error-class.md similarity index 99% rename from docs/sql-error-conditions-insert-column-arity-mismatch.md rename to docs/sql-error-conditions-insert-column-arity-mismatch-error-class.md index 947cc67a414..47d4108982f 100644 --- a/docs/sql-error-conditions-insert-column-arity-mismatch.md +++ b/docs/sql-error-conditions-insert-column-arity-mismatch-error-class.md @@ -36,3 +36,5 @@ Data columns: `<dataColumns>`. too many data columns: Table columns: `<tableColumns>`. Data columns: `<dataColumns>`. + + diff --git a/docs/sql-error-conditions-insufficient-table-property.md b/docs/sql-error-conditions-insufficient-table-property-error-class.md similarity index 97% rename from docs/sql-error-conditions-insufficient-table-property.md rename to docs/sql-error-conditions-insufficient-table-property-error-class.md index 0ac89cbbe76..1577cb3b702 100644 --- a/docs/sql-error-conditions-insufficient-table-property.md +++ b/docs/sql-error-conditions-insufficient-table-property-error-class.md @@ -19,6 +19,8 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + Can't find table property: This error class has the following derived error classes: @@ -30,3 +32,5 @@ This error class has the following derived error classes: ## MISSING_KEY_PART `<key>`, `<totalAmountOfParts>` parts are expected. + + diff --git a/docs/sql-error-conditions-invalid-boundary.md b/docs/sql-error-conditions-invalid-boundary-error-class.md similarity index 97% rename from docs/sql-error-conditions-invalid-boundary.md rename to docs/sql-error-conditions-invalid-boundary-error-class.md index c6871509629..cb6062a70fa 100644 --- a/docs/sql-error-conditions-invalid-boundary.md +++ b/docs/sql-error-conditions-invalid-boundary-error-class.md @@ -19,6 +19,8 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + The boundary `<boundary>` is invalid: `<invalidValue>`. This error class has the following derived error classes: @@ -30,3 +32,5 @@ Expected the value is '0', '`<longMaxValue>`', '[`<intMinValue>`, `<intMaxValue> ## START Expected the value is '0', '`<longMinValue>`', '[`<intMinValue>`, `<intMaxValue>`]'. + + diff --git a/docs/sql-error-conditions-invalid-default-value.md b/docs/sql-error-conditions-invalid-default-value-error-class.md similarity index 98% rename from docs/sql-error-conditions-invalid-default-value.md rename to docs/sql-error-conditions-invalid-default-value-error-class.md index 5bfaca381b4..466b5a9274c 100644 --- a/docs/sql-error-conditions-invalid-default-value.md +++ b/docs/sql-error-conditions-invalid-default-value-error-class.md @@ -19,6 +19,8 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + Failed to execute `<statement>` command because the destination table column `<colName>` has a DEFAULT value `<defaultValue>`, This error class has the following derived error classes: @@ -34,3 +36,5 @@ which contains subquery expressions. ## UNRESOLVED_EXPRESSION which fails to resolve as a valid expression. + + diff --git a/docs/sql-error-conditions-invalid-format-error-class.md b/docs/sql-error-conditions-invalid-format-error-class.md index 6470883435c..299a09dcc71 100644 --- a/docs/sql-error-conditions-invalid-format-error-class.md +++ b/docs/sql-error-conditions-invalid-format-error-class.md @@ -51,7 +51,7 @@ The escape character is not allowed to precede `<char>`. ## MISMATCH_INPUT -The input <inputType> '<input>' does not match the format. +The input `<inputType>` '`<input>`' does not match the format. ## THOUSANDS_SEPS_MUST_BEFORE_DEC diff --git a/docs/sql-error-conditions-invalid-inline-table.md b/docs/sql-error-conditions-invalid-inline-table-error-class.md similarity index 98% rename from docs/sql-error-conditions-invalid-inline-table.md rename to docs/sql-error-conditions-invalid-inline-table-error-class.md index feb4b909d17..a7f2bc28e92 100644 --- a/docs/sql-error-conditions-invalid-inline-table.md +++ b/docs/sql-error-conditions-invalid-inline-table-error-class.md @@ -19,6 +19,8 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + Invalid inline table. This error class has the following derived error classes: @@ -38,3 +40,5 @@ Found incompatible types in the column `<colName>` for inline table. ## NUM_COLUMNS_MISMATCH Inline table expected `<expectedNumCols>` columns but found `<actualNumCols>` columns in row `<rowIndex>`. + + diff --git a/docs/sql-error-conditions-invalid-lamdba-function-call.md b/docs/sql-error-conditions-invalid-lambda-function-call-error-class.md similarity index 82% rename from docs/sql-error-conditions-invalid-lamdba-function-call.md rename to docs/sql-error-conditions-invalid-lambda-function-call-error-class.md index e22150d325c..0bd6a3daa72 100644 --- a/docs/sql-error-conditions-invalid-lamdba-function-call.md +++ b/docs/sql-error-conditions-invalid-lambda-function-call-error-class.md @@ -19,13 +19,15 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + Invalid lambda function call. This error class has the following derived error classes: ## DUPLICATE_ARG_NAMES -The lambda function has duplicate arguments <args>. Please, consider to rename the argument names or set <caseSensitiveConfig> to "true". +The lambda function has duplicate arguments `<args>`. Please, consider to rename the argument names or set `<caseSensitiveConfig>` to "true". ## NON_HIGHER_ORDER_FUNCTION @@ -33,4 +35,6 @@ A lambda function should only be used in a higher order function. However, its c ## NUM_ARGS_MISMATCH -A higher order function expects <expectedNumArgs> arguments, but got <actualNumArgs>. +A higher order function expects `<expectedNumArgs>` arguments, but got `<actualNumArgs>`. + + diff --git a/docs/sql-error-conditions-invalid-limit-like-expression.md b/docs/sql-error-conditions-invalid-limit-like-expression-error-class.md similarity index 98% rename from docs/sql-error-conditions-invalid-limit-like-expression.md rename to docs/sql-error-conditions-invalid-limit-like-expression-error-class.md index e4d3ee10ac6..379d0c6e5a6 100644 --- a/docs/sql-error-conditions-invalid-limit-like-expression.md +++ b/docs/sql-error-conditions-invalid-limit-like-expression-error-class.md @@ -19,6 +19,8 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + The limit like expression `<expr>` is invalid. This error class has the following derived error classes: @@ -38,3 +40,5 @@ The evaluated `<name>` expression must not be null. ## IS_UNFOLDABLE The `<name>` expression must evaluate to a constant value. + + diff --git a/docs/sql-error-conditions-invalid-observed-metrics-error-class.md b/docs/sql-error-conditions-invalid-observed-metrics-error-class.md index e70166fa1c8..394e893fd22 100644 --- a/docs/sql-error-conditions-invalid-observed-metrics-error-class.md +++ b/docs/sql-error-conditions-invalid-observed-metrics-error-class.md @@ -19,6 +19,8 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + Invalid observed metrics. This error class has the following derived error classes: diff --git a/docs/sql-error-conditions-invalid-partition-operation.md b/docs/sql-error-conditions-invalid-partition-operation-error-class.md similarity index 97% rename from docs/sql-error-conditions-invalid-partition-operation.md rename to docs/sql-error-conditions-invalid-partition-operation-error-class.md index a96ab121c94..b373f0ec1cc 100644 --- a/docs/sql-error-conditions-invalid-partition-operation.md +++ b/docs/sql-error-conditions-invalid-partition-operation-error-class.md @@ -19,6 +19,8 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + The partition command is invalid. This error class has the following derived error classes: @@ -30,3 +32,5 @@ Table `<name>` does not support partition management. ## PARTITION_SCHEMA_IS_EMPTY Table `<name>` is not partitioned. + + diff --git a/docs/sql-error-conditions-invalid-schema-error-class.md b/docs/sql-error-conditions-invalid-schema-error-class.md index 4444d3767dd..676a62fd172 100644 --- a/docs/sql-error-conditions-invalid-schema-error-class.md +++ b/docs/sql-error-conditions-invalid-schema-error-class.md @@ -36,7 +36,6 @@ The input expression should be evaluated to struct type, but got `<dataType>`. ## PARSE_ERROR Cannot parse the schema: - `<reason>` diff --git a/docs/sql-error-conditions-invalid-sql-syntax.md b/docs/sql-error-conditions-invalid-sql-syntax-error-class.md similarity index 95% rename from docs/sql-error-conditions-invalid-sql-syntax.md rename to docs/sql-error-conditions-invalid-sql-syntax-error-class.md index d11e9117779..6c9f588ba49 100644 --- a/docs/sql-error-conditions-invalid-sql-syntax.md +++ b/docs/sql-error-conditions-invalid-sql-syntax-error-class.md @@ -19,74 +19,78 @@ license: | limitations under the License. --- -Invalid SQL syntax. +[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) -This error class has the following derived error classes: - -## CREATE_TEMP_FUNC_WITH_IF_NOT_EXISTS +Invalid SQL syntax: -CREATE TEMPORARY FUNCTION with IF NOT EXISTS is not allowed. +This error class has the following derived error classes: ## ANALYZE_TABLE_UNEXPECTED_NOSCAN ANALYZE TABLE(S) ... COMPUTE STATISTICS ... `<ctx>` must be either NOSCAN or empty. -## SHOW_FUNCTIONS_INVALID_SCOPE +## CREATE_FUNC_WITH_IF_NOT_EXISTS_AND_REPLACE -SHOW `<scope>` FUNCTIONS not supported. +CREATE FUNCTION with both IF NOT EXISTS and REPLACE is not allowed. ## CREATE_TEMP_FUNC_WITH_DATABASE CREATE TEMPORARY FUNCTION with specifying a database(`<database>`) is not allowed. -## REPETITIVE_WINDOW_DEFINITION +## CREATE_TEMP_FUNC_WITH_IF_NOT_EXISTS -The definition of window `<windowName>` is repetitive. +CREATE TEMPORARY FUNCTION with IF NOT EXISTS is not allowed. -## MULTI_PART_NAME +## EMPTY_PARTITION_VALUE -`<statement>` with multiple part function name(`<funcName>`) is not allowed. +Partition key `<partKey>` must set value. -## LATERAL_WITHOUT_SUBQUERY_OR_TABLE_VALUED_FUNC +## INVALID_COLUMN_REFERENCE -LATERAL can only be used with subquery and table-valued functions. +Expected a column reference for transform `<transform>`: `<expr>`. -## OPTION_IS_INVALID +## INVALID_TABLE_VALUED_FUNC_NAME -option or property key `<key>` is invalid; only `<supported>` are supported +Table valued function cannot specify database name: `<funcName>`. ## INVALID_WINDOW_REFERENCE Window reference `<windowName>` is not a window specification. -## CREATE_FUNC_WITH_IF_NOT_EXISTS_AND_REPLACE +## LATERAL_WITHOUT_SUBQUERY_OR_TABLE_VALUED_FUNC -CREATE FUNCTION with both IF NOT EXISTS and REPLACE is not allowed. +LATERAL can only be used with subquery and table-valued functions. -## EMPTY_PARTITION_VALUE +## MULTI_PART_NAME -Partition key `<partKey>` must set value. +`<statement>` with multiple part function name(`<funcName>`) is not allowed. -## TRANSFORM_WRONG_NUM_ARGS +## OPTION_IS_INVALID -The transform`<transform>` requires `<expectedNum>` parameters but the actual number is `<actualNum>`. +option or property key `<key>` is invalid; only `<supported>` are supported + +## REPETITIVE_WINDOW_DEFINITION + +The definition of window `<windowName>` is repetitive. ## SHOW_FUNCTIONS_INVALID_PATTERN Invalid pattern in SHOW FUNCTIONS: `<pattern>`. It must be a "STRING" literal. -## UNSUPPORTED_FUNC_NAME +## SHOW_FUNCTIONS_INVALID_SCOPE -Unsupported function name `<funcName>`. +SHOW `<scope>` FUNCTIONS not supported. -## INVALID_COLUMN_REFERENCE +## TRANSFORM_WRONG_NUM_ARGS -Expected a column reference for transform `<transform>`: `<expr>`. +The transform`<transform>` requires `<expectedNum>` parameters but the actual number is `<actualNum>`. ## UNRESOLVED_WINDOW_REFERENCE Cannot resolve window reference `<windowName>`. -## INVALID_TABLE_VALUED_FUNC_NAME +## UNSUPPORTED_FUNC_NAME + +Unsupported function name `<funcName>`. + -Table valued function cannot specify database name: `<funcName>`. diff --git a/docs/sql-error-conditions-invalid-time-travel-timestamp-expr.md b/docs/sql-error-conditions-invalid-time-travel-timestamp-expr-error-class.md similarity index 97% rename from docs/sql-error-conditions-invalid-time-travel-timestamp-expr.md rename to docs/sql-error-conditions-invalid-time-travel-timestamp-expr-error-class.md index edef9551a0e..4d82743219a 100644 --- a/docs/sql-error-conditions-invalid-time-travel-timestamp-expr.md +++ b/docs/sql-error-conditions-invalid-time-travel-timestamp-expr-error-class.md @@ -19,6 +19,8 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + The time travel timestamp expression `<expr>` is invalid. This error class has the following derived error classes: @@ -34,3 +36,5 @@ Must be deterministic. ## UNEVALUABLE Must be evaluable. + + diff --git a/docs/sql-error-conditions-invalid-write-distribution.md b/docs/sql-error-conditions-invalid-write-distribution-error-class.md similarity index 98% rename from docs/sql-error-conditions-invalid-write-distribution.md rename to docs/sql-error-conditions-invalid-write-distribution-error-class.md index 0dccd8b9714..f81bea4769c 100644 --- a/docs/sql-error-conditions-invalid-write-distribution.md +++ b/docs/sql-error-conditions-invalid-write-distribution-error-class.md @@ -19,6 +19,8 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + The requested write distribution is invalid. This error class has the following derived error classes: @@ -34,3 +36,5 @@ The number of partitions can't be specified with unspecified distribution. ## PARTITION_SIZE_WITH_UNSPECIFIED_DISTRIBUTION The advisory partition size can't be specified with unspecified distribution. + + diff --git a/docs/sql-error-conditions-malformed-record-in-parsing.md b/docs/sql-error-conditions-malformed-record-in-parsing-error-class.md similarity index 99% rename from docs/sql-error-conditions-malformed-record-in-parsing.md rename to docs/sql-error-conditions-malformed-record-in-parsing-error-class.md index 77d21553258..ab9582dffcd 100644 --- a/docs/sql-error-conditions-malformed-record-in-parsing.md +++ b/docs/sql-error-conditions-malformed-record-in-parsing-error-class.md @@ -32,3 +32,6 @@ Parsing JSON arrays as structs is forbidden. ## WITHOUT_SUGGESTION + + + diff --git a/docs/sql-error-conditions-missing-attributes.md b/docs/sql-error-conditions-missing-attributes-error-class.md similarity index 99% rename from docs/sql-error-conditions-missing-attributes.md rename to docs/sql-error-conditions-missing-attributes-error-class.md index 22e26419f6f..82d99315bc7 100644 --- a/docs/sql-error-conditions-missing-attributes.md +++ b/docs/sql-error-conditions-missing-attributes-error-class.md @@ -32,3 +32,6 @@ Please check if the right attribute(s) are used. ## RESOLVED_ATTRIBUTE_MISSING_FROM_INPUT + + + diff --git a/docs/sql-error-conditions-not-a-constant-string-error-class.md b/docs/sql-error-conditions-not-a-constant-string-error-class.md index d83a07b8d6e..037382a79f8 100644 --- a/docs/sql-error-conditions-not-a-constant-string-error-class.md +++ b/docs/sql-error-conditions-not-a-constant-string-error-class.md @@ -36,3 +36,5 @@ The expression evaluates to NULL. ## WRONG_TYPE The data type of the expression is `<dataType>`. + + diff --git a/docs/sql-error-conditions-not-allowed-in-from.md b/docs/sql-error-conditions-not-allowed-in-from-error-class.md similarity index 97% rename from docs/sql-error-conditions-not-allowed-in-from.md rename to docs/sql-error-conditions-not-allowed-in-from-error-class.md index a7b32a0b844..99142e9a3c4 100644 --- a/docs/sql-error-conditions-not-allowed-in-from.md +++ b/docs/sql-error-conditions-not-allowed-in-from-error-class.md @@ -19,6 +19,8 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + Not allowed in the FROM clause: This error class has the following derived error classes: @@ -34,3 +36,5 @@ LATERAL together with UNPIVOT. ## UNPIVOT_WITH_PIVOT UNPIVOT together with PIVOT. + + diff --git a/docs/sql-error-conditions-not-supported-in-jdbc-catalog.md b/docs/sql-error-conditions-not-supported-in-jdbc-catalog-error-class.md similarity index 99% rename from docs/sql-error-conditions-not-supported-in-jdbc-catalog.md rename to docs/sql-error-conditions-not-supported-in-jdbc-catalog-error-class.md index 3d93592549f..1d8ebe50854 100644 --- a/docs/sql-error-conditions-not-supported-in-jdbc-catalog.md +++ b/docs/sql-error-conditions-not-supported-in-jdbc-catalog-error-class.md @@ -32,3 +32,5 @@ This error class has the following derived error classes: ## COMMAND_WITH_PROPERTY `<cmd>` with property `<property>`. + + diff --git a/docs/sql-error-conditions-unsupported-add-file.md b/docs/sql-error-conditions-unsupported-add-file-error-class.md similarity index 99% rename from docs/sql-error-conditions-unsupported-add-file.md rename to docs/sql-error-conditions-unsupported-add-file-error-class.md index e7e6217e476..6017e8505dd 100644 --- a/docs/sql-error-conditions-unsupported-add-file.md +++ b/docs/sql-error-conditions-unsupported-add-file-error-class.md @@ -32,3 +32,5 @@ The file `<path>` is a directory, consider to set "spark.sql.legacy.addSingleFil ## LOCAL_DIRECTORY The local directory `<path>` is not supported in a non-local master mode. + + diff --git a/docs/sql-error-conditions-unsupported-default-value.md b/docs/sql-error-conditions-unsupported-default-value-error-class.md similarity index 93% rename from docs/sql-error-conditions-unsupported-default-value.md rename to docs/sql-error-conditions-unsupported-default-value-error-class.md index 17a15d7091b..54597d3bc7e 100644 --- a/docs/sql-error-conditions-unsupported-default-value.md +++ b/docs/sql-error-conditions-unsupported-default-value-error-class.md @@ -19,14 +19,18 @@ license: | limitations under the License. --- +SQLSTATE: none assigned + DEFAULT column values is not supported. This error class has the following derived error classes: ## WITHOUT_SUGGESTION -AES-`<mode>` with the padding `<padding>` by the `<functionName>` function. + ## WITH_SUGGESTION Enable it by setting "spark.sql.defaultColumn.enabled" to "true". + + diff --git a/docs/sql-error-conditions-unsupported-feature-error-class.md b/docs/sql-error-conditions-unsupported-feature-error-class.md index a41502b609a..cc89ba96c2c 100644 --- a/docs/sql-error-conditions-unsupported-feature-error-class.md +++ b/docs/sql-error-conditions-unsupported-feature-error-class.md @@ -71,7 +71,7 @@ Drop the namespace `<namespace>`. ## HIVE_WITH_ANSI_INTERVALS -Hive table <tableName> with ANSI intervals. +Hive table `<tableName>` with ANSI intervals. ## INSERT_PARTITION_SPEC_IF_NOT_EXISTS @@ -125,10 +125,6 @@ Parameter markers are not allowed in `<statement>`. Invalid partitioning: `<cols>` is missing or is in a map or array. -## REPLACE_NESTED_COLUMN - -The replace function does not support nested column <colName>. - ## PIVOT_AFTER_GROUP_BY PIVOT clause following a GROUP BY clause. Consider pushing the GROUP BY into a subquery. @@ -145,6 +141,10 @@ Python UDF in the ON clause of a `<joinType>` JOIN. In case of an INNNER JOIN co Remove a comment from the namespace `<namespace>`. +## REPLACE_NESTED_COLUMN + +The replace function does not support nested column `<colName>`. + ## SET_NAMESPACE_PROPERTY `<property>` is a reserved namespace property, `<msg>`. diff --git a/docs/sql-error-conditions-unsupported-insert.md b/docs/sql-error-conditions-unsupported-insert-error-class.md similarity index 99% rename from docs/sql-error-conditions-unsupported-insert.md rename to docs/sql-error-conditions-unsupported-insert-error-class.md index 98eed0a5b2c..abd6145f6c1 100644 --- a/docs/sql-error-conditions-unsupported-insert.md +++ b/docs/sql-error-conditions-unsupported-insert-error-class.md @@ -40,3 +40,5 @@ An RDD-based table is not allowed. ## READ_FROM The target relation `<relationId>` is also being read from. + + diff --git a/docs/sql-error-conditions-unsupported-merge-condition.md b/docs/sql-error-conditions-unsupported-merge-condition-error-class.md similarity index 99% rename from docs/sql-error-conditions-unsupported-merge-condition.md rename to docs/sql-error-conditions-unsupported-merge-condition-error-class.md index 9b507f6e855..a24f0c9db97 100644 --- a/docs/sql-error-conditions-unsupported-merge-condition.md +++ b/docs/sql-error-conditions-unsupported-merge-condition-error-class.md @@ -36,3 +36,5 @@ Non-deterministic expressions are not allowed: `<cond>`. ## SUBQUERY Subqueries are not allowed: `<cond>`. + + diff --git a/docs/sql-error-conditions-unsupported-overwrite.md b/docs/sql-error-conditions-unsupported-overwrite-error-class.md similarity index 99% rename from docs/sql-error-conditions-unsupported-overwrite.md rename to docs/sql-error-conditions-unsupported-overwrite-error-class.md index 2f8226ea358..42fbc071ab4 100644 --- a/docs/sql-error-conditions-unsupported-overwrite.md +++ b/docs/sql-error-conditions-unsupported-overwrite-error-class.md @@ -32,3 +32,5 @@ The target path is `<path>`. ## TABLE The target table is `<table>`. + + diff --git a/docs/sql-error-conditions.md b/docs/sql-error-conditions.md index db55d99198c..14fe9b71327 100644 --- a/docs/sql-error-conditions.md +++ b/docs/sql-error-conditions.md @@ -45,9 +45,9 @@ ALTER TABLE `<type>` column `<columnName>` specifies descriptor "`<optionName>`" SQLSTATE: none assigned -Name <name> is ambiguous in nested CTE. -Please set <config> to "CORRECTED" so that name defined in inner CTE takes precedence. If set it to "LEGACY", outer CTE definitions will take precedence. -See '<docroot>/sql-migration-guide.html#query-engine'. +Name `<name>` is ambiguous in nested CTE. +Please set `<config>` to "CORRECTED" so that name defined in inner CTE takes precedence. If set it to "LEGACY", outer CTE definitions will take precedence. +See '`<docroot>`/sql-migration-guide.html#query-engine'. ### AMBIGUOUS_COLUMN_OR_FIELD @@ -79,13 +79,13 @@ Ambiguous reference to the field `<field>`. It appears `<count>` times in the sc `<message>`.`<alternative>` If necessary set `<config>` to "false" to bypass this error. -### [AS_OF_JOIN](sql-error-conditions-invalid-as-of-join.html) +### [AS_OF_JOIN](sql-error-conditions-as-of-join-error-class.html) SQLSTATE: none assigned Invalid as-of join. -For more details see [AS_OF_JOIN](sql-error-conditions-invalid-as-of-join.html) +For more details see [AS_OF_JOIN](sql-error-conditions-as-of-join-error-class.html) ### AVRO_INCORRECT_TYPE @@ -151,7 +151,7 @@ Cannot convert SQL `<sqlColumn>` to Protobuf `<protobufColumn>` because `<data>` [SQLSTATE: 22546](sql-error-conditions-sqlstates.html#class-22-data-exception) -Cannot decode url : `<url>`. +The provided URL cannot be decoded: `<url>`. Please ensure that the URL is properly formatted and try again. ### CANNOT_INVOKE_IN_TRANSFORMATIONS @@ -175,7 +175,7 @@ Could not load Protobuf class with name `<protobufClassName>`. `<explanation>`. [SQLSTATE: 42825](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) -Failed to merge incompatible data types `<left>` and `<right>`. +Failed to merge incompatible data types `<left>` and `<right>`. Please check the data types of the columns being merged and ensure that they are compatible. If necessary, consider casting the columns to compatible data types before attempting the merge. ### CANNOT_MERGE_SCHEMAS @@ -192,21 +192,20 @@ Schema that cannot be merged with the initial schema: [SQLSTATE: 46110](sql-error-conditions-sqlstates.html#class-46-java-ddl-1) Cannot modify the value of the Spark config: `<key>`. - See also '`<docroot>`/sql-migration-guide.html#ddl-statements'. ### CANNOT_PARSE_DECIMAL [SQLSTATE: 22018](sql-error-conditions-sqlstates.html#class-22-data-exception) +Cannot parse decimal. Please ensure that the input is a valid number with optional decimal point or comma separators. + ### CANNOT_PARSE_INTERVAL SQLSTATE: none assigned Unable to parse `<intervalString>`. Please ensure that the value provided is in a valid format for defining an interval. You can reference the documentation for the correct format. If the issue persists, please double check that the input value is not null or empty and try again. -Cannot parse decimal. - ### CANNOT_PARSE_JSON_FIELD [SQLSTATE: 2203G](sql-error-conditions-sqlstates.html#class-22-data-exception) @@ -217,7 +216,7 @@ Cannot parse the field name `<fieldName>` and the value `<fieldValue>` of the JS SQLSTATE: none assigned -Error parsing file `<descFilePath>` descriptor byte[] into Descriptor object. +Error parsing descriptor bytes into Protobuf FileDescriptorSet. ### CANNOT_PARSE_TIMESTAMP @@ -229,7 +228,13 @@ Error parsing file `<descFilePath>` descriptor byte[] into Descriptor object. SQLSTATE: none assigned -Could not read footer for file: `<file>`. +Could not read footer for file: `<file>`. Please ensure that the file is in either ORC or Parquet format. If not, please convert it to a valid format. If the file is in the valid format, please check if it is corrupt. If it is, you can choose to either ignore it or fix the corruption. + +### CANNOT_RECOGNIZE_HIVE_TYPE + +[SQLSTATE: 429BB](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) + +Cannot recognize hive type string: `<fieldType>`, column: `<fieldName>`. The specified data type for the field cannot be recognized by Spark SQL. Please check the data type of the specified field and ensure that it is a valid Spark SQL data type. Refer to the Spark SQL documentation for a list of valid data types and their format. If the data type is correct, please ensure that you are using a supported version of Spark SQL. ### CANNOT_RENAME_ACROSS_SCHEMA @@ -243,12 +248,6 @@ SQLSTATE: none assigned Cannot resolve `<targetString>`.* given input columns `<columns>`. Please check that the specified table or struct exists and is accessible in the input columns. -### CANNOT_RECOGNIZE_HIVE_TYPE - -[SQLSTATE: 429BB](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot recognize hive type string: `<fieldType>`, column: `<fieldName>`. - ### CANNOT_RESTORE_PERMISSIONS_FOR_PATH SQLSTATE: none assigned @@ -260,7 +259,6 @@ Failed to set permissions on created path `<path>` back to `<permission>`. SQLSTATE: none assigned Cannot up cast `<expression>` from `<sourceType>` to `<targetType>`. - `<details>` ### CAST_INVALID_INPUT @@ -331,7 +329,6 @@ Another instance of this query was just started by a concurrent session. ### CONCURRENT_STREAM_LOG_UPDATE -<!-- TODO Add 40000 link --> SQLSTATE: 40000 Concurrent update to the log. Multiple streaming jobs detected for `<batchId>`. @@ -343,7 +340,7 @@ SQLSTATE: none assigned Generic Spark Connect error. - For more details see [CONNECT](sql-error-conditions-connect-error-class.html) +For more details see [CONNECT](sql-error-conditions-connect-error-class.html) ### CONVERSION_INVALID_INPUT @@ -369,7 +366,7 @@ CREATE TABLE column `<columnName>` specifies descriptor "`<optionName>`" more th Cannot resolve `<sqlExpr>` due to data type mismatch: - For more details see [DATATYPE_MISMATCH](sql-error-conditions-datatype-mismatch-error-class.html) +For more details see [DATATYPE_MISMATCH](sql-error-conditions-datatype-mismatch-error-class.html) ### DATATYPE_MISSING_SIZE @@ -417,7 +414,7 @@ Division by zero. Use `try_divide` to tolerate divisor being 0 and return NULL i SQLSTATE: none assigned -Duplicated field names in Arrow Struct are not allowed, got <fieldNames>. +Duplicated field names in Arrow Struct are not allowed, got `<fieldNames>`. ### DUPLICATED_MAP_KEY @@ -501,7 +498,7 @@ Failed to rename `<sourcePath>` to `<targetPath>` as destination already exists. SQLSTATE: none assigned -Cannot `<op>` column, because `<fieldNames>` already exists in <struct>. +Cannot `<op>` column, because `<fieldNames>` already exists in `<struct>`. ### FIELD_NOT_FOUND @@ -573,25 +570,25 @@ GROUP BY position `<index>` is not in select list (valid range is [1, `<size>`]) SQLSTATE: none assigned -The expression `<sqlExpr>` cannot be used as a grouping expression because its data type <dataType> is not an orderable data type. +The expression `<sqlExpr>` cannot be used as a grouping expression because its data type `<dataType>` is not an orderable data type. ### HLL_INVALID_INPUT_SKETCH_BUFFER SQLSTATE: none assigned -Invalid call to <function>; only valid HLL sketch buffers are supported as inputs (such as those produced by the `hll_sketch_agg` function)." +Invalid call to `<function>`; only valid HLL sketch buffers are supported as inputs (such as those produced by the `hll_sketch_agg` function). ### HLL_INVALID_LG_K SQLSTATE: none assigned -Invalid call to <function>; the `lgConfigK` value must be between <min> and <max>, inclusive: <value>." +Invalid call to `<function>`; the `lgConfigK` value must be between `<min>` and `<max>`, inclusive: `<value>`. ### HLL_UNION_DIFFERENT_LG_K SQLSTATE: none assigned -Sketches have different `lgConfigK` values: <left> and <right>. Set the `allowDifferentLgConfigK` parameter to true to call <function> with different `lgConfigK` values." +Sketches have different `lgConfigK` values: `<left>` and `<right>`. Set the `allowDifferentLgConfigK` parameter to true to call `<function>` with different `lgConfigK` values. ### IDENTIFIER_TOO_MANY_NAME_PARTS @@ -609,7 +606,7 @@ Invalid pivot column `<columnName>`. Pivot columns must be comparable. [SQLSTATE: 42825](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) -`<operator>` can only be performed on tables with compatible column types. The `<columnOrdinalNumber>` column of the `<tableOrdinalNumber>` table is <dataType1> type which is not compatible with <dataType2> at the same column of the first table.`<hint>`. +`<operator>` can only be performed on tables with compatible column types. The `<columnOrdinalNumber>` column of the `<tableOrdinalNumber>` table is `<dataType1>` type which is not compatible with `<dataType2>` at the same column of the first table.`<hint>`. ### INCOMPATIBLE_DATASOURCE_REGISTER @@ -621,14 +618,13 @@ Detected an incompatible DataSourceRegister. Please remove the incompatible libr [SQLSTATE: 42613](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) -The join types <joinType1> and <joinType2> are incompatible. +The join types `<joinType1>` and `<joinType2>` are incompatible. ### INCOMPATIBLE_VIEW_SCHEMA_CHANGE SQLSTATE: none assigned The SQL query of view `<viewName>` has an incompatible schema change and column `<colName>` cannot be resolved. Expected `<expectedNum>` columns named `<colName>` but got `<actualCols>`. - Please try to re-create the view by running: `<suggestion>`. ### [INCOMPLETE_TYPE_DEFINITION](sql-error-conditions-incomplete-type-definition-error-class.html) @@ -637,7 +633,7 @@ Please try to re-create the view by running: `<suggestion>`. Incomplete complex type: - For more details see [INCOMPLETE_TYPE_DEFINITION](sql-error-conditions-incomplete-type-definition-error-class.html) +For more details see [INCOMPLETE_TYPE_DEFINITION](sql-error-conditions-incomplete-type-definition-error-class.html) ### [INCONSISTENT_BEHAVIOR_CROSS_VERSION](sql-error-conditions-inconsistent-behavior-cross-version-error-class.html) @@ -645,7 +641,7 @@ Incomplete complex type: You may get a different result due to the upgrading to - For more details see [INCONSISTENT_BEHAVIOR_CROSS_VERSION](sql-error-conditions-inconsistent-behavior-cross-version-error-class.html) +For more details see [INCONSISTENT_BEHAVIOR_CROSS_VERSION](sql-error-conditions-inconsistent-behavior-cross-version-error-class.html) ### INCORRECT_END_OFFSET @@ -671,6 +667,14 @@ Cannot create the index `<indexName>` on table `<tableName>` because it already Cannot find the index `<indexName>` on table `<tableName>`. +### [INSERT_COLUMN_ARITY_MISMATCH](sql-error-conditions-insert-column-arity-mismatch-error-class.html) + +[SQLSTATE: 21S01](sql-error-conditions-sqlstates.html#class-21-cardinality-violation) + +Cannot write to `<tableName>`, the reason is + +For more details see [INSERT_COLUMN_ARITY_MISMATCH](sql-error-conditions-insert-column-arity-mismatch-error-class.html) + ### INSERT_PARTITION_COLUMN_ARITY_MISMATCH [SQLSTATE: 21S01](sql-error-conditions-sqlstates.html#class-21-cardinality-violation) @@ -680,13 +684,13 @@ Table columns: `<tableColumns>`. Partition columns with static values: `<staticPartCols>`. Data columns: `<dataColumns>`. -### [INSUFFICIENT_TABLE_PROPERTY](sql-error-conditions-insufficient-table-property.html) +### [INSUFFICIENT_TABLE_PROPERTY](sql-error-conditions-insufficient-table-property-error-class.html) SQLSTATE: none assigned Can't find table property: - For more details see [INSUFFICIENT_TABLE_PROPERTY](sql-error-conditions-insufficient-table-property.html) +For more details see [INSUFFICIENT_TABLE_PROPERTY](sql-error-conditions-insufficient-table-property-error-class.html) ### INTERNAL_ERROR @@ -742,19 +746,19 @@ The index `<indexValue>` is out of bounds. The array has `<arraySize>` elements. The index `<indexValue>` is out of bounds. The array has `<arraySize>` elements. Use `try_element_at` to tolerate accessing element at invalid index and return NULL instead. If necessary set `<ansiConfig>` to "false" to bypass this error. -### [INVALID_BOUNDARY](sql-error-conditions-invalid-boundary.html) +### INVALID_BITMAP_POSITION -SQLSTATE: none assigned +[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) -The boundary `<boundary>` is invalid: `<invalidValue>`. +The 0-indexed bitmap position `<bitPosition>` is out of bounds. The bitmap has `<bitmapNumBits>` bits (`<bitmapNumBytes>` bytes). - For more details see [INVALID_BOUNDARY](sql-error-conditions-invalid-boundary.html) +### [INVALID_BOUNDARY](sql-error-conditions-invalid-boundary-error-class.html) -### INVALID_BITMAP_POSITION +SQLSTATE: none assigned -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) +The boundary `<boundary>` is invalid: `<invalidValue>`. -The 0-indexed bitmap position `<bitPosition>` is out of bounds. The bitmap has `<bitmapNumBits>` bits (`<bitmapNumBytes>` bytes). +For more details see [INVALID_BOUNDARY](sql-error-conditions-invalid-boundary-error-class.html) ### INVALID_BUCKET_FILE @@ -780,17 +784,16 @@ The datasource `<datasource>` cannot save the column `<columnName>` because its Column or field `<name>` is of type `<type>` while it's required to be `<expectedType>`. -### [INVALID_DEFAULT_VALUE](sql-error-conditions-invalid-default-value.html) +### [INVALID_DEFAULT_VALUE](sql-error-conditions-invalid-default-value-error-class.html) SQLSTATE: none assigned Failed to execute `<statement>` command because the destination table column `<colName>` has a DEFAULT value `<defaultValue>`, - - For more details see [INVALID_DEFAULT_VALUE](sql-error-conditions-invalid-default-value.html) + +For more details see [INVALID_DEFAULT_VALUE](sql-error-conditions-invalid-default-value-error-class.html) ### INVALID_DRIVER_MEMORY -<!-- TODO Add F0000 link --> SQLSTATE: F0000 System memory `<systemMemory>` must be at least `<minSystemMemory>`. Please increase heap size using the --driver-memory option or "`<config>`" in Spark configuration. @@ -815,10 +818,9 @@ SQLSTATE: none assigned ### INVALID_EXECUTOR_MEMORY -<!-- TODO Add F0000 link --> SQLSTATE: F0000 -Executor memory `<executorMemory>` must be at least `<minSystemMemory>`. Please increase executor memory using the --executor-memory option or "`<config>`" in Spark configuration." +Executor memory `<executorMemory>` must be at least `<minSystemMemory>`. Please increase executor memory using the --executor-memory option or "`<config>`" in Spark configuration. ### INVALID_EXTRACT_BASE_FIELD_TYPE @@ -850,7 +852,7 @@ Field name `<fieldName>` is invalid: `<path>` is not a struct. The format is invalid: `<format>`. - For more details see [INVALID_FORMAT](sql-error-conditions-invalid-format-error-class.html) +For more details see [INVALID_FORMAT](sql-error-conditions-invalid-format-error-class.html) ### INVALID_FRACTION_OF_SECOND @@ -874,7 +876,15 @@ The identifier `<ident>` is invalid. Please, consider quoting it with back-quote [SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) -The index 0 is invalid. An index shall be either < 0 or > 0 (the first element has index 1). +The index 0 is invalid. An index shall be either `< 0 or >` 0 (the first element has index 1). + +### [INVALID_INLINE_TABLE](sql-error-conditions-invalid-inline-table-error-class.html) + +SQLSTATE: none assigned + +Invalid inline table. + +For more details see [INVALID_INLINE_TABLE](sql-error-conditions-invalid-inline-table-error-class.html) ### INVALID_JSON_ROOT_FIELD @@ -888,13 +898,13 @@ Cannot convert JSON root field to target Spark type. Input schema `<jsonSchema>` can only contain STRING as a key type for a MAP. -### [INVALID_LAMBDA_FUNCTION_CALL](sql-error-conditions-invalid-lamdba-function-call.html) +### [INVALID_LAMBDA_FUNCTION_CALL](sql-error-conditions-invalid-lambda-function-call-error-class.html) SQLSTATE: none assigned Invalid lambda function call. -For more details see [INVALID_LAMBDA_FUNCTION_CALL](sql-error-conditions-invalid-lamdba-function-call.html) +For more details see [INVALID_LAMBDA_FUNCTION_CALL](sql-error-conditions-invalid-lambda-function-call-error-class.html) ### INVALID_LATERAL_JOIN_TYPE @@ -902,13 +912,13 @@ For more details see [INVALID_LAMBDA_FUNCTION_CALL](sql-error-conditions-invalid The `<joinType>` JOIN with LATERAL correlation is not allowed because an OUTER subquery cannot correlate to its join partner. Remove the LATERAL correlation or use an INNER JOIN, or LEFT OUTER JOIN instead. -### [INVALID_LIMIT_LIKE_EXPRESSION](sql-error-conditions-invalid-limit-like-expression.html) +### [INVALID_LIMIT_LIKE_EXPRESSION](sql-error-conditions-invalid-limit-like-expression-error-class.html) SQLSTATE: none assigned The limit like expression `<expr>` is invalid. -For more details see [INVALID_LIMIT_LIKE_EXPRESSION](sql-error-conditions-invalid-limit-like-expression.html) +For more details see [INVALID_LIMIT_LIKE_EXPRESSION](sql-error-conditions-invalid-limit-like-expression-error-class.html) ### INVALID_NON_DETERMINISTIC_EXPRESSIONS @@ -922,13 +932,21 @@ SQLSTATE: none assigned Numeric literal `<rawStrippedQualifier>` is outside the valid range for `<typeName>` with minimum value of `<minValue>` and maximum value of `<maxValue>`. Please adjust the value accordingly. +### [INVALID_OBSERVED_METRICS](sql-error-conditions-invalid-observed-metrics-error-class.html) + +SQLSTATE: none assigned + +Invalid observed metrics. + +For more details see [INVALID_OBSERVED_METRICS](sql-error-conditions-invalid-observed-metrics-error-class.html) + ### [INVALID_OPTIONS](sql-error-conditions-invalid-options-error-class.html) [SQLSTATE: 42K06](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) Invalid options: - For more details see [INVALID_OPTIONS](sql-error-conditions-invalid-options-error-class.html) +For more details see [INVALID_OPTIONS](sql-error-conditions-invalid-options-error-class.html) ### INVALID_PANDAS_UDF_PLACEMENT @@ -942,15 +960,15 @@ The group aggregate pandas UDF `<functionList>` cannot be invoked together with The value of parameter(s) `<parameter>` in `<functionName>` is invalid: - For more details see [INVALID_PARAMETER_VALUE](sql-error-conditions-invalid-parameter-value-error-class.html) +For more details see [INVALID_PARAMETER_VALUE](sql-error-conditions-invalid-parameter-value-error-class.html) -### [INVALID_PARTITION_OPERATION](sql-error-conditions-invalid-partition-operation.html) +### [INVALID_PARTITION_OPERATION](sql-error-conditions-invalid-partition-operation-error-class.html) SQLSTATE: none assigned The partition command is invalid. -For more details see [INVALID_PARTITION_OPERATION](sql-error-conditions-invalid-partition-operation.html) +For more details see [INVALID_PARTITION_OPERATION](sql-error-conditions-invalid-partition-operation-error-class.html) ### INVALID_PROPERTY_KEY @@ -970,7 +988,7 @@ For more details see [INVALID_PARTITION_OPERATION](sql-error-conditions-invalid- The input schema `<inputSchema>` is not a valid schema string. - For more details see [INVALID_SCHEMA](sql-error-conditions-invalid-schema-error-class.html) +For more details see [INVALID_SCHEMA](sql-error-conditions-invalid-schema-error-class.html) ### INVALID_SET_SYNTAX @@ -984,11 +1002,13 @@ SQLSTATE: none assigned The argument `<name>` of `sql()` is invalid. Consider to replace it by a SQL literal. -### [INVALID_SQL_SYNTAX](sql-error-conditions-invalid-sql-syntax.html) +### [INVALID_SQL_SYNTAX](sql-error-conditions-invalid-sql-syntax-error-class.html) [SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) -Invalid SQL syntax: `<inputString>`. +Invalid SQL syntax: + +For more details see [INVALID_SQL_SYNTAX](sql-error-conditions-invalid-sql-syntax-error-class.html) ### [INVALID_SUBQUERY_EXPRESSION](sql-error-conditions-invalid-subquery-expression-error-class.html) @@ -996,7 +1016,7 @@ Invalid SQL syntax: `<inputString>`. Invalid subquery: - For more details see [INVALID_SUBQUERY_EXPRESSION](sql-error-conditions-invalid-subquery-expression-error-class.html) +For more details see [INVALID_SUBQUERY_EXPRESSION](sql-error-conditions-invalid-subquery-expression-error-class.html) ### INVALID_TEMP_OBJ_REFERENCE @@ -1004,13 +1024,13 @@ SQLSTATE: none assigned Cannot create the persistent object `<objName>` of the type `<obj>` because it references to the temporary object `<tempObjName>` of the type `<tempObj>`. Please make the temporary object `<tempObjName>` persistent, or make the persistent object `<objName>` temporary. -### [INVALID_TIME_TRAVEL_TIMESTAMP_EXPR](sql-error-conditions-invalid-time-travel-timestamp-expr.html) +### [INVALID_TIME_TRAVEL_TIMESTAMP_EXPR](sql-error-conditions-invalid-time-travel-timestamp-expr-error-class.html) SQLSTATE: none assigned The time travel timestamp expression `<expr>` is invalid. - For more details see [INVALID_TIME_TRAVEL_TIMESTAMP_EXPR](sql-error-conditions-invalid-time-travel-timestamp-expr.html) +For more details see [INVALID_TIME_TRAVEL_TIMESTAMP_EXPR](sql-error-conditions-invalid-time-travel-timestamp-expr-error-class.html) ### INVALID_TYPED_LITERAL @@ -1022,7 +1042,7 @@ The value of the typed literal `<valueType>` is invalid: `<value>`. SQLSTATE: none assigned -Function <funcName> does not implement ScalarFunction or AggregateFunction. +Function `<funcName>` does not implement ScalarFunction or AggregateFunction. ### INVALID_URL @@ -1047,7 +1067,6 @@ The view `<viewName>` cannot be displayed due to invalid view text: `<viewText>` [SQLSTATE: 42903](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) The WHERE condition `<condition>` contains invalid expressions: `<expressionList>`. - Rewrite the query to avoid window functions, aggregate functions, and generator functions in the WHERE clause. ### INVALID_WINDOW_SPEC_FOR_AGGREGATION_FUNC @@ -1056,13 +1075,13 @@ SQLSTATE: none assigned Cannot specify ORDER BY or a window frame for `<aggFunc>`. -### [INVALID_WRITE_DISTRIBUTION](sql-error-conditions-invalid-write-distribution.html) +### [INVALID_WRITE_DISTRIBUTION](sql-error-conditions-invalid-write-distribution-error-class.html) SQLSTATE: none assigned The requested write distribution is invalid. - For more details see [INVALID_WRITE_DISTRIBUTION](sql-error-conditions-invalid-write-distribution.html) +For more details see [INVALID_WRITE_DISTRIBUTION](sql-error-conditions-invalid-write-distribution-error-class.html) ### JOIN_CONDITION_IS_NOT_BOOLEAN_TYPE @@ -1074,7 +1093,7 @@ The join condition `<joinCondition>` has the invalid type `<conditionType>`, exp SQLSTATE: none assigned -LOCAL must be used together with the schema of `file`, but got: `<actualSchema>`. +LOCAL must be used together with the schema of `file`, but got: ``<actualSchema>``. ### LOCATION_ALREADY_EXISTS @@ -1094,14 +1113,14 @@ SQLSTATE: none assigned Malformed Protobuf messages are detected in message deserialization. Parse Mode: `<failFastMode>`. To process malformed protobuf message as null result, try setting the option 'mode' as 'PERMISSIVE'. -### [MALFORMED_RECORD_IN_PARSING](sql-error-conditions-malformed-record-in-parsing.html) +### [MALFORMED_RECORD_IN_PARSING](sql-error-conditions-malformed-record-in-parsing-error-class.html) [SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) Malformed records are detected in record parsing: `<badRecord>`. Parse Mode: `<failFastMode>`. To process malformed records as null result, try setting the option 'mode' as 'PERMISSIVE'. - For more details see [MALFORMED_RECORD_IN_PARSING](sql-error-conditions-malformed-record-in-parsing.html) +For more details see [MALFORMED_RECORD_IN_PARSING](sql-error-conditions-malformed-record-in-parsing-error-class.html) ### MERGE_CARDINALITY_VIOLATION @@ -1115,16 +1134,15 @@ This could result in the target row being operated on more than once with an upd [SQLSTATE: 42803](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) The non-aggregating expression `<expression>` is based on columns which are not participating in the GROUP BY clause. - Add the columns or the expression to the GROUP BY, aggregate the expression, or use `<expressionAnyValue>` if you do not care which of the values within a group is returned. -### [MISSING_ATTRIBUTES](sql-error-conditions-missing-attributes.html) +### [MISSING_ATTRIBUTES](sql-error-conditions-missing-attributes-error-class.html) SQLSTATE: none assigned Resolved attribute(s) `<missingAttributes>` missing from `<input>` in operator `<operator>`. - For more details see [MISSING_ATTRIBUTES](sql-error-conditions-missing-attributes.html) +For more details see [MISSING_ATTRIBUTES](sql-error-conditions-missing-attributes-error-class.html) ### MISSING_GROUP_BY @@ -1192,13 +1210,13 @@ SQLSTATE: none assigned Window function is not supported in `<windowFunc>` (as column `<columnName>`) on streaming DataFrames/Datasets. Structured Streaming only supports time-window aggregation using the WINDOW function. (window specification: `<windowSpec>`) -### [NOT_ALLOWED_IN_FROM](sql-error-conditions-not-allowed-in-from.html) +### [NOT_ALLOWED_IN_FROM](sql-error-conditions-not-allowed-in-from-error-class.html) SQLSTATE: none assigned Not allowed in the FROM clause: - For more details see [NOT_ALLOWED_IN_FROM](sql-error-conditions-not-allowed-in-from.html) +For more details see [NOT_ALLOWED_IN_FROM](sql-error-conditions-not-allowed-in-from-error-class.html) ### [NOT_A_CONSTANT_STRING](sql-error-conditions-not-a-constant-string-error-class.html) @@ -1220,7 +1238,7 @@ Operation `<operation>` is not allowed for `<tableIdentWithDB>` because it is no Assigning a NULL is not allowed here. - For more details see [NOT_NULL_CONSTRAINT_VIOLATION](sql-error-conditions-not-null-constraint-violation-error-class.html) +For more details see [NOT_NULL_CONSTRAINT_VIOLATION](sql-error-conditions-not-null-constraint-violation-error-class.html) ### NOT_SUPPORTED_CHANGE_COLUMN @@ -1240,13 +1258,13 @@ SQLSTATE: none assigned `<cmd>` is not supported, if you want to enable it, please set "spark.sql.catalogImplementation" to "hive". -### [NOT_SUPPORTED_IN_JDBC_CATALOG](sql-error-conditions-not-supported-in-jdbc-catalog.html) +### [NOT_SUPPORTED_IN_JDBC_CATALOG](sql-error-conditions-not-supported-in-jdbc-catalog-error-class.html) -SQLSTATE: none assigned +[SQLSTATE: 46110](sql-error-conditions-sqlstates.html#class-46-java-ddl-1) Not supported command in JDBC catalog: - For more details see [NOT_SUPPORTED_IN_JDBC_CATALOG](sql-error-conditions-not-supported-in-jdbc-catalog.html) +For more details see [NOT_SUPPORTED_IN_JDBC_CATALOG](sql-error-conditions-not-supported-in-jdbc-catalog-error-class.html) ### NO_DEFAULT_COLUMN_VALUE_AVAILABLE @@ -1337,7 +1355,6 @@ Syntax error at or near `<error>``<hint>`. [SQLSTATE: 428FT](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) Cannot ADD or RENAME TO partition(s) `<partitionList>` in table `<tableName>` because they already exist. - Choose a different name, drop the existing partition, or add the IF NOT EXISTS clause to tolerate a pre-existing partition. ### PARTITIONS_NOT_FOUND @@ -1345,9 +1362,7 @@ Choose a different name, drop the existing partition, or add the IF NOT EXISTS c [SQLSTATE: 428FT](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) The partition(s) `<partitionList>` cannot be found in table `<tableName>`. - Verify the partition specification and table name. - To tolerate the error on drop use ALTER TABLE … DROP IF EXISTS PARTITION. ### PATH_ALREADY_EXISTS @@ -1463,7 +1478,6 @@ The `<clause>` clause may be used at most once per `<operation>` operation. [SQLSTATE: 42723](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) Cannot create the function `<routineName>` because it already exists. - Choose a different name, drop or replace the existing function, or add the IF NOT EXISTS clause to tolerate a pre-existing function. ### ROUTINE_NOT_FOUND @@ -1471,9 +1485,7 @@ Choose a different name, drop or replace the existing function, or add the IF NO [SQLSTATE: 42883](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) The function `<routineName>` cannot be found. Verify the spelling and correctness of the schema and catalog. - If you did not qualify the name with a schema and catalog, verify the current_schema() output, or qualify the name with the correct schema and catalog. - To tolerate the error on drop use DROP FUNCTION IF EXISTS. ### SCALAR_SUBQUERY_IS_IN_GROUP_BY_OR_AGGREGATE_FUNCTION @@ -1493,7 +1505,6 @@ More than one row returned by a subquery used as an expression. [SQLSTATE: 42P06](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) Cannot create schema `<schemaName>` because it already exists. - Choose a different name, drop the existing schema, or add the IF NOT EXISTS clause to tolerate pre-existing schema. ### SCHEMA_NOT_EMPTY @@ -1501,7 +1512,6 @@ Choose a different name, drop the existing schema, or add the IF NOT EXISTS clau [SQLSTATE: 2BP01](sql-error-conditions-sqlstates.html#class-2B-dependent-privilege-descriptors-still-exist) Cannot drop a schema `<schemaName>` because it contains objects. - Use DROP SCHEMA ... CASCADE to drop the schema and all its objects. ### SCHEMA_NOT_FOUND @@ -1509,9 +1519,7 @@ Use DROP SCHEMA ... CASCADE to drop the schema and all its objects. [SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) The schema `<schemaName>` cannot be found. Verify the spelling and correctness of the schema and catalog. - If you did not qualify the name with a catalog, verify the current_schema() output, or qualify the name with the correct catalog. - To tolerate the error on drop use DROP SCHEMA IF EXISTS. ### SECOND_FUNCTION_ARGUMENT_NOT_INTEGER @@ -1579,7 +1587,6 @@ The sum of the LIMIT clause and the OFFSET clause must not be greater than the m [SQLSTATE: 42P07](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) Cannot create table or view `<relationName>` because it already exists. - Choose a different name, drop or replace the existing object, or add the IF NOT EXISTS clause to tolerate pre-existing objects. ### TABLE_OR_VIEW_NOT_FOUND @@ -1587,9 +1594,7 @@ Choose a different name, drop or replace the existing object, or add the IF NOT [SQLSTATE: 42P01](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) The table or view `<relationName>` cannot be found. Verify the spelling and correctness of the schema and catalog. - If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog. - To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. ### TABLE_VALUED_FUNCTION_TOO_MANY_TABLE_ARGUMENTS @@ -1609,7 +1614,6 @@ Task failed while writing rows to `<path>`. [SQLSTATE: 42P07](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) Cannot create the temporary view `<relationName>` because it already exists. - Choose a different name, drop or replace the existing view, or add the IF NOT EXISTS clause to tolerate pre-existing views. ### TEMP_VIEW_NAME_TOO_MANY_NAME_PARTS @@ -1706,7 +1710,7 @@ Unrecognized SQL type - name: `<typeName>`, id: `<jdbcType>`. SQLSTATE: none assigned -Could not resolve `<name>` to a table-valued function. Please make sure that <name> is defined as a table-valued function and that all required parameters are provided correctly. If `<name>` is not defined, please create the table-valued function before using it. For more information about defining table-valued functions, please refer to the Apache Spark documentation. +Could not resolve `<name>` to a table-valued function. Please make sure that `<name>` is defined as a table-valued function and that all required parameters are provided correctly. If `<name>` is not defined, please create the table-valued function before using it. For more information about defining table-valued functions, please refer to the Apache Spark documentation. ### UNRESOLVED_ALL_IN_GROUP_BY @@ -1720,7 +1724,7 @@ Cannot infer grouping columns for GROUP BY ALL based on the select clause. Pleas A column or function parameter with name `<objectName>` cannot be resolved. - For more details see [UNRESOLVED_COLUMN](sql-error-conditions-unresolved-column-error-class.html) +For more details see [UNRESOLVED_COLUMN](sql-error-conditions-unresolved-column-error-class.html) ### [UNRESOLVED_FIELD](sql-error-conditions-unresolved-field-error-class.html) @@ -1728,7 +1732,7 @@ A column or function parameter with name `<objectName>` cannot be resolved. A field with name `<fieldName>` cannot be resolved with the struct-type column `<columnPath>`. - For more details see [UNRESOLVED_FIELD](sql-error-conditions-unresolved-field-error-class.html) +For more details see [UNRESOLVED_FIELD](sql-error-conditions-unresolved-field-error-class.html) ### [UNRESOLVED_MAP_KEY](sql-error-conditions-unresolved-map-key-error-class.html) @@ -1736,7 +1740,7 @@ A field with name `<fieldName>` cannot be resolved with the struct-type column ` Cannot resolve column `<objectName>` as a map key. If the key is a string literal, add the single quotes '' around it. - For more details see [UNRESOLVED_MAP_KEY](sql-error-conditions-unresolved-map-key-error-class.html) +For more details see [UNRESOLVED_MAP_KEY](sql-error-conditions-unresolved-map-key-error-class.html) ### UNRESOLVED_ROUTINE @@ -1756,13 +1760,13 @@ SQLSTATE: none assigned Attempted to unset non-existent properties [`<properties>`] in table `<table>`. -### [UNSUPPORTED_ADD_FILE](sql-error-conditions-unsupported-add-file.html) +### [UNSUPPORTED_ADD_FILE](sql-error-conditions-unsupported-add-file-error-class.html) SQLSTATE: none assigned Don't support add file. - For more details see [UNSUPPORTED_ADD_FILE](sql-error-conditions-unsupported-add-file.html) +For more details see [UNSUPPORTED_ADD_FILE](sql-error-conditions-unsupported-add-file-error-class.html) ### UNSUPPORTED_ARROWTYPE @@ -1794,13 +1798,13 @@ SQLSTATE: none assigned The direct query on files does not support the data source type: `<className>`. Please try a different data source type or consider using a different query method. -### [UNSUPPORTED_DEFAULT_VALUE](sql-error-conditions-unsupported-default-value.html) +### [UNSUPPORTED_DEFAULT_VALUE](sql-error-conditions-unsupported-default-value-error-class.html) SQLSTATE: none assigned DEFAULT column values is not supported. - For more details see [UNSUPPORTED_DEFAULT_VALUE](sql-error-conditions-unsupported-default-value.html) +For more details see [UNSUPPORTED_DEFAULT_VALUE](sql-error-conditions-unsupported-default-value-error-class.html) ### [UNSUPPORTED_DESERIALIZER](sql-error-conditions-unsupported-deserializer-error-class.html) @@ -1808,7 +1812,7 @@ DEFAULT column values is not supported. The deserializer is not supported: - For more details see [UNSUPPORTED_DESERIALIZER](sql-error-conditions-unsupported-deserializer-error-class.html) +For more details see [UNSUPPORTED_DESERIALIZER](sql-error-conditions-unsupported-deserializer-error-class.html) ### UNSUPPORTED_EXPRESSION_GENERATED_COLUMN @@ -1821,7 +1825,6 @@ Cannot create generated column `<fieldName>` with generation expression `<expres SQLSTATE: none assigned A query operator contains one or more unsupported expressions. Consider to rewrite it to avoid window functions, aggregate functions, and generator functions in the WHERE clause. - Invalid expressions: [`<invalidExprSqls>`] ### UNSUPPORTED_EXPR_FOR_WINDOW @@ -1836,7 +1839,7 @@ Expression `<sqlExpr>` not supported within a window function. The feature is not supported: - For more details see [UNSUPPORTED_FEATURE](sql-error-conditions-unsupported-feature-error-class.html) +For more details see [UNSUPPORTED_FEATURE](sql-error-conditions-unsupported-feature-error-class.html) ### [UNSUPPORTED_GENERATOR](sql-error-conditions-unsupported-generator-error-class.html) @@ -1844,7 +1847,7 @@ The feature is not supported: The generator is not supported: - For more details see [UNSUPPORTED_GENERATOR](sql-error-conditions-unsupported-generator-error-class.html) +For more details see [UNSUPPORTED_GENERATOR](sql-error-conditions-unsupported-generator-error-class.html) ### UNSUPPORTED_GROUPING_EXPRESSION @@ -1852,29 +1855,29 @@ SQLSTATE: none assigned grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup. -### [UNSUPPORTED_INSERT](sql-error-conditions-unsupported-insert.html) +### [UNSUPPORTED_INSERT](sql-error-conditions-unsupported-insert-error-class.html) SQLSTATE: none assigned Can't insert into the target. - For more details see [UNSUPPORTED_INSERT](sql-error-conditions-unsupported-insert.html) +For more details see [UNSUPPORTED_INSERT](sql-error-conditions-unsupported-insert-error-class.html) -### [UNSUPPORTED_MERGE_CONDITION](sql-error-conditions-unsupported-merge-condition.html) +### [UNSUPPORTED_MERGE_CONDITION](sql-error-conditions-unsupported-merge-condition-error-class.html) SQLSTATE: none assigned MERGE operation contains unsupported `<condName>` condition. - For more details see [UNSUPPORTED_MERGE_CONDITION](sql-error-conditions-unsupported-merge-condition.html) +For more details see [UNSUPPORTED_MERGE_CONDITION](sql-error-conditions-unsupported-merge-condition-error-class.html) -### [UNSUPPORTED_OVERWRITE](sql-error-conditions-unsupported-overwrite.html) +### [UNSUPPORTED_OVERWRITE](sql-error-conditions-unsupported-overwrite-error-class.html) SQLSTATE: none assigned Can't overwrite the target that is also being read from. - For more details see [UNSUPPORTED_OVERWRITE](sql-error-conditions-unsupported-overwrite.html) +For more details see [UNSUPPORTED_OVERWRITE](sql-error-conditions-unsupported-overwrite-error-class.html) ### [UNSUPPORTED_SAVE_MODE](sql-error-conditions-unsupported-save-mode-error-class.html) @@ -1882,7 +1885,7 @@ SQLSTATE: none assigned The save mode `<saveMode>` is not supported for: - For more details see [UNSUPPORTED_SAVE_MODE](sql-error-conditions-unsupported-save-mode-error-class.html) +For more details see [UNSUPPORTED_SAVE_MODE](sql-error-conditions-unsupported-save-mode-error-class.html) ### [UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY](sql-error-conditions-unsupported-subquery-expression-category-error-class.html) @@ -1890,7 +1893,7 @@ The save mode `<saveMode>` is not supported for: Unsupported subquery expression: - For more details see [UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY](sql-error-conditions-unsupported-subquery-expression-category-error-class.html) +For more details see [UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY](sql-error-conditions-unsupported-subquery-expression-category-error-class.html) ### UNSUPPORTED_TYPED_LITERAL @@ -1903,11 +1906,8 @@ Literals of the type `<unsupportedType>` are not supported. Supported types are SQLSTATE: none assigned You're using untyped Scala UDF, which does not have the input type information. Spark may blindly pass null to the Scala closure with primitive-type argument, and the closure will see the default value of the Java type for the null argument, e.g. `udf((x: Int) => x, IntegerType)`, the result is 0 for null input. To get rid of this error, you could: - 1. use typed Scala UDF APIs(without return type parameter), e.g. `udf((x: Int) => x)`. - 2. use Java UDF APIs, e.g. `udf(new UDF1[String, Integer] { override def call(s: String): Integer = s.length() }, IntegerType)`, if input types are all non primitive. - 3. set "spark.sql.legacy.allowUntypedScalaUDF" to "true" and use this API with caution. ### UPDATE_FIELD_WITH_STRUCT_UNSUPPORTED @@ -1921,7 +1921,6 @@ Cannot update `<table>` field `<fieldName>` type: update a struct by updating it [SQLSTATE: 42P07](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) Cannot create view `<relationName>` because it already exists. - Choose a different name, drop or replace the existing object, or add the IF NOT EXISTS clause to tolerate pre-existing objects. ### VIEW_NOT_FOUND @@ -1929,9 +1928,7 @@ Choose a different name, drop or replace the existing object, or add the IF NOT [SQLSTATE: 42P01](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) The view `<relationName>` cannot be found. Verify the spelling and correctness of the schema and catalog. - If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog. - To tolerate the error on drop use DROP VIEW IF EXISTS. ### WINDOW_FUNCTION_AND_FRAME_MISMATCH @@ -1964,6 +1961,6 @@ The operation `<operation>` requires a `<requiredType>`. But `<objectName>` is a The `<functionName>` requires `<expectedNum>` parameters but the actual number is `<actualNum>`. - For more details see [WRONG_NUM_ARGS](sql-error-conditions-wrong-num-args-error-class.html) +For more details see [WRONG_NUM_ARGS](sql-error-conditions-wrong-num-args-error-class.html) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org