diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 832826333f090..63f86a7a5a994 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -766,6 +766,8 @@ jobs: run: ./dev/lint-r - name: Run documentation build run: | + # We need this link because the jekyll build calls `python`. + ln -s "$(which python3.9)" "/usr/local/bin/python" # Build docs first with SKIP_API to ensure they are buildable without requiring any # language docs to be built beforehand. cd docs; SKIP_API=1 bundle exec jekyll build; cd .. diff --git a/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala b/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala index 1492543c56bbc..9e795c3e32ec1 100644 --- a/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala +++ b/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala @@ -20,11 +20,8 @@ package org.apache.spark import java.io.File import java.nio.charset.StandardCharsets import java.nio.file.Files -import java.util.Locale -import scala.jdk.CollectionConverters._ 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 @@ -48,12 +45,6 @@ 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 regenerateCommand = "SPARK_GENERATE_GOLDEN_FILES=1 build/sbt " + "\"core/testOnly *SparkThrowableSuite -- -t \\\"Error classes match with document\\\"\"" @@ -173,219 +164,6 @@ class SparkThrowableSuite extends SparkFunSuite { checkIfUnique(messageFormats) } - test("Error classes match with document") { - val errors = errorReader.errorInfoMap - - // 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 - - 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 - } - - def orphanedGoldenFiles(): Iterable[File] = { - val subErrorFileNames = errors.filter(_._2.subClass.isDefined).map(error => { - getErrorPath(error._1) + ".md" - }).toSet - - val docsDir = getWorkspaceFilePath("docs") - val orphans = FileUtils.listFiles(docsDir.toFile, Array("md"), false).asScala.filter { f => - (f.getName.startsWith("sql-error-conditions-") && f.getName.endsWith("-error-class.md")) && - !subErrorFileNames.contains(f.getName) - } - orphans - } - - val sqlErrorParentDocContent = errors.toSeq.filter(!_._1.startsWith("_LEGACY_ERROR")) - .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 { - assert(subErrorDoc.trim == errorsInDoc.trim, - "The error class document is not up to date. " + - s"Please regenerate it by running `$regenerateCommand`") - } - }) - - 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, - StandardCharsets.UTF_8) - } - } else { - assert(sqlErrorParentDoc.trim == commonErrorsInDoc.trim, - "The error class document is not up to date. " + - s"Please regenerate it by running `$regenerateCommand`") - } - - val orphans = orphanedGoldenFiles() - if (regenerateGoldenFiles) { - if (orphans.nonEmpty) { - logInfo(s"Orphaned error class documents (${orphans.size}) is not empty, " + - "executing cleanup operation.") - orphans.foreach { f => - FileUtils.deleteQuietly(f) - logInfo(s"Cleanup orphaned error document: ${f.getName}.") - } - } else { - logInfo("Orphaned error class documents is empty") - } - } else { - assert(orphans.isEmpty, - "Exist orphaned error class documents. " + - s"Please regenerate it by running `$regenerateCommand`") - } - } - test("Round trip") { val tmpFile = File.createTempFile("rewritten", ".json") val mapper = JsonMapper.builder() diff --git a/docs/README.md b/docs/README.md index fac9010d86922..414c8dbd83035 100644 --- a/docs/README.md +++ b/docs/README.md @@ -39,24 +39,22 @@ You need to have [Ruby 3][ruby] and [Python 3][python] installed. Make sure the $ gem install bundler ``` -After this all the required ruby dependencies can be installed from the `docs/` directory via the Bundler: +After this all the required Ruby dependencies can be installed from the `docs/` directory via Bundler: ```sh -$ cd docs +$ cd "$SPARK_HOME"/docs $ bundle install ``` -To generate the Python or R docs, you'll need to [install Pandoc](https://pandoc.org/installing.html). - -### SQL and Python API Documentation (Optional) - -To generate SQL and Python API docs, you'll need to install these libraries: +And the required Python dependencies can be installed using pip: -Run the following command from $SPARK_HOME: ```sh +$ cd "$SPARK_HOME" $ pip install --upgrade -r dev/requirements.txt ``` +To generate the Python or R API docs, you'll also need to [install Pandoc](https://pandoc.org/installing.html). + ### R API Documentation (Optional) If you'd like to generate R API documentation, install these libraries: @@ -121,6 +119,10 @@ The jekyll plugin also generates the PySpark docs using [Sphinx](http://sphinx-d using [roxygen2](https://cran.r-project.org/web/packages/roxygen2/index.html) and SQL docs using [MkDocs](https://www.mkdocs.org/). -NOTE: To skip the step of building and copying over the Scala, Java, Python, R and SQL API docs, run `SKIP_API=1 -bundle exec jekyll build`. In addition, `SKIP_SCALADOC=1`, `SKIP_PYTHONDOC=1`, `SKIP_RDOC=1` and `SKIP_SQLDOC=1` can be used -to skip a single step of the corresponding language. `SKIP_SCALADOC` indicates skipping both the Scala and Java docs. +To control what API docs get built, you can set any combination of the following shell variables before you run `bundle exec jekyll build`: +* `SKIP_API=1`: Skip building all the API docs. +* `SKIP_SCALADOC=1`: Skip the Scala and Java API docs. +* `SKIP_PYTHONDOC=1`: Skip the Python API docs. +* `SKIP_RDOC=1`: Skip the R API docs. +* `SKIP_SQLDOC=1`: Skip the SQL API docs. + diff --git a/docs/_data/menu-sql.yaml b/docs/_data/menu-sql.yaml index 04792ebf576fa..46dc4f3388cbd 100644 --- a/docs/_data/menu-sql.yaml +++ b/docs/_data/menu-sql.yaml @@ -106,48 +106,3 @@ url: sql-ref-syntax.html#auxiliary-statements - text: Error Conditions url: sql-error-conditions.html - subitems: - - text: SQLSTATE Codes - url: sql-error-conditions-sqlstates.html - - text: COLLECTION_SIZE_LIMIT_EXCEEDED error class - url: sql-error-conditions-collection-size-limit-exceeded-error-class.html - - text: CONNECT error class - url: sql-error-conditions-connect-error-class.html - - text: DATATYPE_MISMATCH error class - url: sql-error-conditions-datatype-mismatch-error-class.html - - text: INCOMPATIBLE_DATA_FOR_TABLE error class - url: sql-error-conditions-incompatible-data-for-table-error-class.html - - text: INCOMPLETE_TYPE_DEFINITION error class - url: sql-error-conditions-incomplete-type-definition-error-class.html - - text: INCONSISTENT_BEHAVIOR_CROSS_VERSION error class - url: sql-error-conditions-inconsistent-behavior-cross-version-error-class.html - - text: INVALID_FORMAT error class - url: sql-error-conditions-invalid-format-error-class.html - - text: INVALID_OPTIONS error class - url: sql-error-conditions-invalid-options-error-class.html - - text: INVALID_PARAMETER_VALUE error class - url: sql-error-conditions-invalid-parameter-value-error-class.html - - text: INVALID_SCHEMA error class - url: sql-error-conditions-invalid-schema-error-class.html - - text: INVALID_SUBQUERY_EXPRESSION error class - url: sql-error-conditions-invalid-subquery-expression-error-class.html - - text: NOT_NULL_CONSTRAINT_VIOLATION error class - url: sql-error-conditions-not-null-constraint-violation-error-class.html - - text: UNRESOLVED_COLUMN error class - url: sql-error-conditions-unresolved-column-error-class.html - - text: UNRESOLVED_FIELD error class - url: sql-error-conditions-unresolved-field-error-class.html - - text: UNRESOLVED_MAP_KEY error class - url: sql-error-conditions-unresolved-map-key-error-class.html - - text: UNSUPPORTED_DESERIALIZER error class - url: sql-error-conditions-unsupported-deserializer-error-class.html - - text: UNSUPPORTED_FEATURE error class - url: sql-error-conditions-unsupported-feature-error-class.html - - text: UNSUPPORTED_GENERATOR error class - url: sql-error-conditions-unsupported-generator-error-class.html - - text: UNSUPPORTED_SAVE_MODE error class - url: sql-error-conditions-unsupported-save-mode-error-class.html - - text: UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY error class - url: sql-error-conditions-unsupported-subquery-expression-category-error-class.html - - text: WRONG_NUM_ARGS error class - url: sql-error-conditions-wrong-num-args-error-class.html diff --git a/docs/_plugins/build_api_docs.rb b/docs/_plugins/build_api_docs.rb index 5b52f3799cc4a..8d3ef86ac3d66 100644 --- a/docs/_plugins/build_api_docs.rb +++ b/docs/_plugins/build_api_docs.rb @@ -188,6 +188,14 @@ def build_sql_docs cp_r("../sql/site/.", "api/sql") end +def build_error_docs + print_header "Building error docs." + system("python '#{SPARK_PROJECT_ROOT}/docs/util/build-error-docs.py'") \ + || raise("Error doc generation failed") +end + +build_error_docs + if not (ENV['SKIP_API'] == '1') if not (ENV['SKIP_SCALADOC'] == '1') build_scala_and_java_docs diff --git a/docs/css/custom.css b/docs/css/custom.css index 22175068023b7..9edb466606555 100644 --- a/docs/css/custom.css +++ b/docs/css/custom.css @@ -988,3 +988,26 @@ table.spark-config th:nth-child(4), table.spark-config td:nth-child(4) { width: 90px; } + +table#error-conditions { + table-layout: fixed; + + span.error-condition-name { + /* Any error names that wrap will have the wrapped lines indented + relative to the first line thanks to these three rules. + */ + padding-left: 2em; + text-indent: -2em; + display: block; + } + + th:nth-child(1), + td:nth-child(1) { + /* width: 85px; */ + width: 105px; + } + + td.error-sub-condition { + padding-left: 2.5em; + } +} diff --git a/docs/sql-error-conditions-as-of-join-error-class.md b/docs/sql-error-conditions-as-of-join-error-class.md deleted file mode 100644 index df122c22616e5..0000000000000 --- a/docs/sql-error-conditions-as-of-join-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: AS_OF_JOIN error class -displayTitle: AS_OF_JOIN error class -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. ---- - - - -[SQLSTATE: 42604](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid as-of join. - -This error class has the following derived error classes: - -## TOLERANCE_IS_NON_NEGATIVE - -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-cannot-create-data-source-table-error-class.md b/docs/sql-error-conditions-cannot-create-data-source-table-error-class.md deleted file mode 100644 index a5bc5c0dc094b..0000000000000 --- a/docs/sql-error-conditions-cannot-create-data-source-table-error-class.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: global -title: CANNOT_CREATE_DATA_SOURCE_TABLE error class -displayTitle: CANNOT_CREATE_DATA_SOURCE_TABLE error class -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. ---- - - - -[SQLSTATE: 42KDE](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to create data source table ``: - -This error class has the following derived error classes: - -## EXTERNAL_METADATA_UNSUPPORTED - -provider '``' does not support external metadata but a schema is provided. Please remove the schema when creating the table. - - diff --git a/docs/sql-error-conditions-cannot-load-state-store-error-class.md b/docs/sql-error-conditions-cannot-load-state-store-error-class.md deleted file mode 100644 index 1f44e5592eba8..0000000000000 --- a/docs/sql-error-conditions-cannot-load-state-store-error-class.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -layout: global -title: CANNOT_LOAD_STATE_STORE error class -displayTitle: CANNOT_LOAD_STATE_STORE error class -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. ---- - - - -SQLSTATE: 58030 - -An error occurred during loading state. - -This error class has the following derived error classes: - -## CANNOT_READ_CHECKPOINT - -Cannot read RocksDB checkpoint metadata. Expected ``, but found ``. - -## CANNOT_READ_DELTA_FILE_KEY_SIZE - -Error reading delta file `` of ``: key size cannot be ``. - -## CANNOT_READ_DELTA_FILE_NOT_EXISTS - -Error reading delta file `` of ``: `` does not exist. - -## CANNOT_READ_SNAPSHOT_FILE_KEY_SIZE - -Error reading snapshot file `` of ``: key size cannot be ``. - -## CANNOT_READ_SNAPSHOT_FILE_VALUE_SIZE - -Error reading snapshot file `` of ``: value size cannot be ``. - -## CANNOT_READ_STREAMING_STATE_FILE - -Error reading streaming state file of `` does not exist. If the stream job is restarted with a new or updated state operation, please create a new checkpoint location or clear the existing checkpoint location. - -## UNCATEGORIZED - - - -## UNEXPECTED_FILE_SIZE - -Copied `` to ``, expected `` bytes, found `` bytes. - -## UNEXPECTED_VERSION - -Version cannot be `` because it is less than 0. - -## UNRELEASED_THREAD_ERROR - -``: RocksDB instance could not be acquired by `` for operationType=`` as it was not released by `` after `` ms. -Thread holding the lock has trace: `` - - diff --git a/docs/sql-error-conditions-cannot-update-field-error-class.md b/docs/sql-error-conditions-cannot-update-field-error-class.md deleted file mode 100644 index fe27ab90d149d..0000000000000 --- a/docs/sql-error-conditions-cannot-update-field-error-class.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -layout: global -title: CANNOT_UPDATE_FIELD error class -displayTitle: CANNOT_UPDATE_FIELD error class -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. ---- - - - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Cannot update `` field `` type: - -This error class has the following derived error classes: - -## ARRAY_TYPE - -Update the element by updating ``.element. - -## INTERVAL_TYPE - -Update an interval by updating its fields. - -## MAP_TYPE - -Update a map by updating ``.key or ``.value. - -## STRUCT_TYPE - -Update a struct by updating its fields. - -## USER_DEFINED_TYPE - -Update a UserDefinedType[``] by updating its fields. - - diff --git a/docs/sql-error-conditions-cannot-write-state-store-error-class.md b/docs/sql-error-conditions-cannot-write-state-store-error-class.md deleted file mode 100644 index 0bed5755bdb83..0000000000000 --- a/docs/sql-error-conditions-cannot-write-state-store-error-class.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: global -title: CANNOT_WRITE_STATE_STORE error class -displayTitle: CANNOT_WRITE_STATE_STORE error class -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. ---- - - - -SQLSTATE: 58030 - -Error writing state store files for provider ``. - -This error class has the following derived error classes: - -## CANNOT_COMMIT - -Cannot perform commit during state checkpoint. - - diff --git a/docs/sql-error-conditions-collection-size-limit-exceeded-error-class.md b/docs/sql-error-conditions-collection-size-limit-exceeded-error-class.md deleted file mode 100644 index 0d502245459e7..0000000000000 --- a/docs/sql-error-conditions-collection-size-limit-exceeded-error-class.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -layout: global -title: COLLECTION_SIZE_LIMIT_EXCEEDED error class -displayTitle: COLLECTION_SIZE_LIMIT_EXCEEDED error class -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. ---- - - - -[SQLSTATE: 54000](sql-error-conditions-sqlstates.html#class-54-program-limit-exceeded) - -Can't create array with `` elements which exceeding the array size limit ``, - -This error class has the following derived error classes: - -## FUNCTION - -unsuccessful try to create arrays in the function ``. - -## INITIALIZE - -cannot initialize an array with specified parameters. - -## PARAMETER - -the value of parameter(s) `` in the function `` is invalid. - - diff --git a/docs/sql-error-conditions-complex-expression-unsupported-input-error-class.md b/docs/sql-error-conditions-complex-expression-unsupported-input-error-class.md deleted file mode 100644 index e73499ffabd51..0000000000000 --- a/docs/sql-error-conditions-complex-expression-unsupported-input-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: COMPLEX_EXPRESSION_UNSUPPORTED_INPUT error class -displayTitle: COMPLEX_EXPRESSION_UNSUPPORTED_INPUT error class -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. ---- - - - -[SQLSTATE: 42K09](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot process input data types for the expression: ``. - -This error class has the following derived error classes: - -## MISMATCHED_TYPES - -All input types must be the same except nullable, containsNull, valueContainsNull flags, but found the input types ``. - -## NO_INPUTS - -The collection of input data types must not be empty. - - diff --git a/docs/sql-error-conditions-connect-error-class.md b/docs/sql-error-conditions-connect-error-class.md deleted file mode 100644 index c6d2057b09836..0000000000000 --- a/docs/sql-error-conditions-connect-error-class.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -layout: global -title: CONNECT error class -displayTitle: CONNECT error class -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. ---- - - - -SQLSTATE: 56K00 - -Generic Spark Connect error. - -This error class has the following derived error classes: - -## INTERCEPTOR_CTOR_MISSING - -Cannot instantiate GRPC interceptor because `` is missing a default constructor without arguments. - -## INTERCEPTOR_RUNTIME_ERROR - -Error instantiating GRPC interceptor: `` - -## PLUGIN_CTOR_MISSING - -Cannot instantiate Spark Connect plugin because `` is missing a default constructor without arguments. - -## PLUGIN_RUNTIME_ERROR - -Error instantiating Spark Connect plugin: `` - -## SESSION_NOT_SAME - -Both Datasets must belong to the same SparkSession. - - diff --git a/docs/sql-error-conditions-create-view-column-arity-mismatch-error-class.md b/docs/sql-error-conditions-create-view-column-arity-mismatch-error-class.md deleted file mode 100644 index a11449954ee0a..0000000000000 --- a/docs/sql-error-conditions-create-view-column-arity-mismatch-error-class.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -layout: global -title: CREATE_VIEW_COLUMN_ARITY_MISMATCH error class -displayTitle: CREATE_VIEW_COLUMN_ARITY_MISMATCH error class -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. ---- - - - -[SQLSTATE: 21S01](sql-error-conditions-sqlstates.html#class-21-cardinality-violation) - -Cannot create view ``, the reason is - -This error class has the following derived error classes: - -## NOT_ENOUGH_DATA_COLUMNS - -not enough data columns: -View columns: ``. -Data columns: ``. - -## TOO_MANY_DATA_COLUMNS - -too many data columns: -View columns: ``. -Data columns: ``. - - diff --git a/docs/sql-error-conditions-datatype-mismatch-error-class.md b/docs/sql-error-conditions-datatype-mismatch-error-class.md deleted file mode 100644 index 9ef342d3d1eab..0000000000000 --- a/docs/sql-error-conditions-datatype-mismatch-error-class.md +++ /dev/null @@ -1,258 +0,0 @@ ---- -layout: global -title: DATATYPE_MISMATCH error class -displayTitle: DATATYPE_MISMATCH error class -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. ---- - - - -[SQLSTATE: 42K09](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot resolve `` due to data type mismatch: - -This error class has the following derived error classes: - -## ARRAY_FUNCTION_DIFF_TYPES - -Input to `` should have been `` followed by a value with same element type, but it's [``, ``]. - -## BINARY_ARRAY_DIFF_TYPES - -Input to function `` should have been two `` with same element type, but it's [``, ``]. - -## BINARY_OP_DIFF_TYPES - -the left and right operands of the binary operator have incompatible types (`` and ``). - -## BINARY_OP_WRONG_TYPE - -the binary operator requires the input type ``, not ``. - -## BLOOM_FILTER_BINARY_OP_WRONG_TYPE - -The Bloom filter binary input to `` should be either a constant value or a scalar subquery expression, but it's ``. - -## BLOOM_FILTER_WRONG_TYPE - -Input to function `` should have been `` followed by value with ``, but it's [``]. - -## CANNOT_CONVERT_TO_JSON - -Unable to convert column `` of type `` to JSON. - -## CANNOT_DROP_ALL_FIELDS - -Cannot drop all fields in struct. - -## CAST_WITHOUT_SUGGESTION - -cannot cast `` to ``. - -## CAST_WITH_CONF_SUGGESTION - -cannot cast `` to `` with ANSI mode on. -If you have to cast `` to ``, you can set `` as ``. - -## CAST_WITH_FUNC_SUGGESTION - -cannot cast `` to ``. -To convert values from `` to ``, you can use the functions `` instead. - -## CREATE_MAP_KEY_DIFF_TYPES - -The given keys of function `` should all be the same type, but they are ``. - -## CREATE_MAP_VALUE_DIFF_TYPES - -The given values of function `` should all be the same type, but they are ``. - -## CREATE_NAMED_STRUCT_WITHOUT_FOLDABLE_STRING - -Only foldable `STRING` expressions are allowed to appear at odd position, but they are ``. - -## DATA_DIFF_TYPES - -Input to `` should all be the same type, but it's ``. - -## FILTER_NOT_BOOLEAN - -Filter expression `` of type `` is not a boolean. - -## HASH_MAP_TYPE - -Input to the function `` cannot contain elements of the "MAP" type. In Spark, same maps may have different hashcode, thus hash expressions are prohibited on "MAP" elements. To restore previous behavior set "spark.sql.legacy.allowHashOnMapType" to "true". - -## HASH_VARIANT_TYPE - -Input to the function `` cannot contain elements of the "VARIANT" type yet. - -## INPUT_SIZE_NOT_ONE - -Length of `` should be 1. - -## INVALID_ARG_VALUE - -The `` value must to be a `` literal of ``, but got ``. - -## INVALID_JSON_MAP_KEY_TYPE - -Input schema `` can only contain STRING as a key type for a MAP. - -## INVALID_JSON_SCHEMA - -Input schema `` must be a struct, an array, a map or a variant. - -## INVALID_MAP_KEY_TYPE - -The key of map cannot be/contain ``. - -## INVALID_ORDERING_TYPE - -The `` does not support ordering on type ``. - -## INVALID_ROW_LEVEL_OPERATION_ASSIGNMENTS - -`` - -## INVALID_XML_MAP_KEY_TYPE - -Input schema `` can only contain STRING as a key type for a MAP. - -## IN_SUBQUERY_DATA_TYPE_MISMATCH - -The data type of one or more elements in the left hand side of an IN subquery is not compatible with the data type of the output of the subquery. Mismatched columns: [``], left side: [``], right side: [``]. - -## IN_SUBQUERY_LENGTH_MISMATCH - -The number of columns in the left hand side of an IN subquery does not match the number of columns in the output of subquery. Left hand side columns(length: ``): [``], right hand side columns(length: ``): [``]. - -## MAP_CONCAT_DIFF_TYPES - -The `` should all be of type map, but it's ``. - -## MAP_FUNCTION_DIFF_TYPES - -Input to `` should have been `` followed by a value with same key type, but it's [``, ``]. - -## MAP_ZIP_WITH_DIFF_TYPES - -Input to the `` should have been two maps with compatible key types, but it's [``, ``]. - -## NON_FOLDABLE_INPUT - -the input `` should be a foldable `` expression; however, got ``. - -## NON_STRING_TYPE - -all arguments must be strings. - -## NULL_TYPE - -Null typed values cannot be used as arguments of ``. - -## PARAMETER_CONSTRAINT_VIOLATION - -The ``(``) must be `` the ``(``). - -## RANGE_FRAME_INVALID_TYPE - -The data type `` used in the order specification does not match the data type `` which is used in the range frame. - -## RANGE_FRAME_MULTI_ORDER - -A range window frame with value boundaries cannot be used in a window specification with multiple order by expressions: ``. - -## RANGE_FRAME_WITHOUT_ORDER - -A range window frame cannot be used in an unordered window specification. - -## SEQUENCE_WRONG_INPUT_TYPES - -`` 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 `` type, then the step expression must resolve to the `` type. -3. Otherwise, if start and stop expressions resolve to the `` type, then the step expression must resolve to the same type. - -## SPECIFIED_WINDOW_FRAME_DIFF_TYPES - -Window frame bounds `` and `` do not have the same type: `` <> ``. - -## SPECIFIED_WINDOW_FRAME_INVALID_BOUND - -Window frame upper bound `` does not follow the lower bound ``. - -## SPECIFIED_WINDOW_FRAME_UNACCEPTED_TYPE - -The data type of the `` bound `` does not match the expected data type ``. - -## SPECIFIED_WINDOW_FRAME_WITHOUT_FOLDABLE - -Window frame `` bound `` is not a literal. - -## SPECIFIED_WINDOW_FRAME_WRONG_COMPARISON - -The lower bound of a window frame must be `` to the upper bound. - -## STACK_COLUMN_DIFF_TYPES - -The data type of the column (``) do not have the same type: `` (``) <> `` (``). - -## TYPE_CHECK_FAILURE_WITH_HINT - -````. - -## UNEXPECTED_CLASS_TYPE - -class `` not found. - -## UNEXPECTED_INPUT_TYPE - -The `` parameter requires the `` type, however `` has the type ``. - -## UNEXPECTED_NULL - -The `` must not be null. - -## UNEXPECTED_RETURN_TYPE - -The `` requires return `` type, but the actual is `` type. - -## UNEXPECTED_STATIC_METHOD - -cannot find a static method `` that matches the argument types in ``. - -## UNSUPPORTED_INPUT_TYPE - -The input of `` can't be `` type data. - -## VALUE_OUT_OF_RANGE - -The `` must be between `` (current value = ``). - -## WRONG_NUM_ARG_TYPES - -The expression requires `` argument types but the actual number is ``. - -## WRONG_NUM_ENDPOINTS - -The number of endpoints must be >= 2 to construct intervals but the actual number is ``. - - diff --git a/docs/sql-error-conditions-duplicate-routine-parameter-assignment-error-class.md b/docs/sql-error-conditions-duplicate-routine-parameter-assignment-error-class.md deleted file mode 100644 index 288088e57e7c4..0000000000000 --- a/docs/sql-error-conditions-duplicate-routine-parameter-assignment-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: DUPLICATE_ROUTINE_PARAMETER_ASSIGNMENT error class -displayTitle: DUPLICATE_ROUTINE_PARAMETER_ASSIGNMENT error class -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. ---- - - - -[SQLSTATE: 4274K](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Call to function `` is invalid because it includes multiple argument assignments to the same parameter name ``. - -This error class has the following derived error classes: - -## BOTH_POSITIONAL_AND_NAMED - -A positional argument and named argument both referred to the same parameter. Please remove the named argument referring to this parameter. - -## DOUBLE_NAMED_ARGUMENT_REFERENCE - -More than one named argument referred to the same parameter. Please assign a value only once. - - diff --git a/docs/sql-error-conditions-expect-table-not-view-error-class.md b/docs/sql-error-conditions-expect-table-not-view-error-class.md deleted file mode 100644 index 0ab99ce33fa83..0000000000000 --- a/docs/sql-error-conditions-expect-table-not-view-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: EXPECT_TABLE_NOT_VIEW error class -displayTitle: EXPECT_TABLE_NOT_VIEW error class -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. ---- - - - -[SQLSTATE: 42809](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -'``' expects a table but `` is a view. - -This error class has the following derived error classes: - -## NO_ALTERNATIVE - - - -## USE_ALTER_VIEW - -Please use ALTER VIEW instead. - - diff --git a/docs/sql-error-conditions-expect-view-not-table-error-class.md b/docs/sql-error-conditions-expect-view-not-table-error-class.md deleted file mode 100644 index 97a6f59e13f42..0000000000000 --- a/docs/sql-error-conditions-expect-view-not-table-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: EXPECT_VIEW_NOT_TABLE error class -displayTitle: EXPECT_VIEW_NOT_TABLE error class -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. ---- - - - -[SQLSTATE: 42809](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The table `` does not support ``. - -This error class has the following derived error classes: - -## NO_ALTERNATIVE - - - -## USE_ALTER_TABLE - -Please use ALTER TABLE instead. - - diff --git a/docs/sql-error-conditions-failed-jdbc-error-class.md b/docs/sql-error-conditions-failed-jdbc-error-class.md deleted file mode 100644 index bc8464c188d7c..0000000000000 --- a/docs/sql-error-conditions-failed-jdbc-error-class.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -layout: global -title: FAILED_JDBC error class -displayTitle: FAILED_JDBC error class -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. ---- - - - -SQLSTATE: HV000 - -Failed JDBC `` on the operation: - -This error class has the following derived error classes: - -## ALTER_TABLE - -Alter the table ``. - -## CREATE_INDEX - -Create the index `` in the `` table. - -## CREATE_NAMESPACE - -Create the namespace ``. - -## CREATE_NAMESPACE_COMMENT - -Create a comment on the namespace: ``. - -## CREATE_TABLE - -Create the table ``. - -## DROP_INDEX - -Drop the index `` in the `` table. - -## DROP_NAMESPACE - -Drop the namespace ``. - -## GET_TABLES - -Get tables from the namespace: ``. - -## LIST_NAMESPACES - -List namespaces. - -## NAMESPACE_EXISTS - -Check that the namespace `` exists. - -## REMOVE_NAMESPACE_COMMENT - -Remove a comment on the namespace: ``. - -## RENAME_TABLE - -Rename the table `` to ``. - -## TABLE_EXISTS - -Check that the table `` exists. - -## UNCLASSIFIED - -`` - - diff --git a/docs/sql-error-conditions-incompatible-data-for-table-error-class.md b/docs/sql-error-conditions-incompatible-data-for-table-error-class.md deleted file mode 100644 index 2f84dc90b6536..0000000000000 --- a/docs/sql-error-conditions-incompatible-data-for-table-error-class.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -layout: global -title: INCOMPATIBLE_DATA_FOR_TABLE error class -displayTitle: INCOMPATIBLE_DATA_FOR_TABLE error class -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. ---- - - - -SQLSTATE: KD000 - -Cannot write incompatible data for the table ``: - -This error class has the following derived error classes: - -## AMBIGUOUS_COLUMN_NAME - -Ambiguous column name in the input data ``. - -## CANNOT_FIND_DATA - -Cannot find data for the output column ``. - -## CANNOT_SAFELY_CAST - -Cannot safely cast `` `` to ``. - -## EXTRA_COLUMNS - -Cannot write extra columns ``. - -## EXTRA_STRUCT_FIELDS - -Cannot write extra fields `` to the struct ``. - -## NULLABLE_ARRAY_ELEMENTS - -Cannot write nullable elements to array of non-nulls: ``. - -## NULLABLE_COLUMN - -Cannot write nullable values to non-null column ``. - -## NULLABLE_MAP_VALUES - -Cannot write nullable values to map of non-nulls: ``. - -## STRUCT_MISSING_FIELDS - -Struct `` missing fields: ``. - -## UNEXPECTED_COLUMN_NAME - -Struct `` ``-th field name does not match (may be out of order): expected ``, found ``. - - diff --git a/docs/sql-error-conditions-incomplete-type-definition-error-class.md b/docs/sql-error-conditions-incomplete-type-definition-error-class.md deleted file mode 100644 index b84d4c37b7f03..0000000000000 --- a/docs/sql-error-conditions-incomplete-type-definition-error-class.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -layout: global -title: INCOMPLETE_TYPE_DEFINITION error class -displayTitle: INCOMPLETE_TYPE_DEFINITION error class -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. ---- - - - -[SQLSTATE: 42K01](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Incomplete complex type: - -This error class has the following derived error classes: - -## ARRAY - -The definition of "ARRAY" type is incomplete. You must provide an element type. For example: "ARRAY``". - -## MAP - -The definition of "MAP" type is incomplete. You must provide a key type and a value type. For example: "MAP". - -## STRUCT - -The definition of "STRUCT" type is incomplete. You must provide at least one field type. For example: "STRUCT". - - 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 deleted file mode 100644 index 15027d5575c88..0000000000000 --- a/docs/sql-error-conditions-inconsistent-behavior-cross-version-error-class.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -layout: global -title: INCONSISTENT_BEHAVIOR_CROSS_VERSION error class -displayTitle: INCONSISTENT_BEHAVIOR_CROSS_VERSION error class -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. ---- - - - -[SQLSTATE: 42K0B](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -You may get a different result due to the upgrading to - -This error class has the following derived error classes: - -## DATETIME_PATTERN_RECOGNITION - -Spark >= 3.0: -Fail to recognize `` pattern in the DateTimeFormatter. -1) You can set `` to "LEGACY" to restore the behavior before Spark 3.0. -2) You can form a valid datetime pattern with the guide from '``/sql-ref-datetime-pattern.html'. - -## DATETIME_WEEK_BASED_PATTERN - -Spark >= 3.0: -All week-based patterns are unsupported since Spark 3.0, detected week-based character: ``. -Please use the SQL function EXTRACT instead. - -## PARSE_DATETIME_BY_NEW_PARSER - -Spark >= 3.0: -Fail to parse `` in the new parser. -You can set `` 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 `` 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 `` or the datasource option `
- - - - - - - - - - -
SQLSTATEDescription and issuing error classes
0A000feature not supported
INVALID_PANDAS_UDF_PLACEMENT, STAR_GROUP_BY_POS, UNSUPPORTED_ARROWTYPE, UNSUPPORTED_DATATYPE, UNSUPPORTED_DESERIALIZER, UNSUPPORTED_FEATURE, UNSUPPORTED_GENERATOR, UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY, UNSUPPORTED_TYPED_LITERAL -
-## Class `21`: cardinality violation - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
21000cardinality violation
SCALAR_SUBQUERY_TOO_MANY_ROWS -
-## Class `22`: data exception - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
22003numeric value out of range
ARITHMETIC_OVERFLOW, CAST_OVERFLOW, CAST_OVERFLOW_IN_TABLE_INSERT, DECIMAL_PRECISION_EXCEEDS_MAX_PRECISION, INVALID_INDEX_OF_ZERO, INCORRECT_RAMP_UP_RATE, INVALID_ARRAY_INDEX, INVALID_ARRAY_INDEX_IN_ELEMENT_AT, NUMERIC_OUT_OF_SUPPORTED_RANGE, NUMERIC_VALUE_OUT_OF_RANGE -
22007invalid datetime format
CANNOT_PARSE_TIMESTAMP -
22008datetime field overflow
DATETIME_OVERFLOW -
2200Enull value in array target
NULL_MAP_KEY -
22012division by zero
DIVIDE_BY_ZERO, INTERVAL_DIVIDED_BY_ZERO -
22015interval field overflow
INTERVAL_ARITHMETIC_OVERFLOW -
22018invalid character value for cast
CANNOT_PARSE_DECIMAL, CAST_INVALID_INPUT, CONVERSION_INVALID_INPUT -
22023invalid parameter value
INVALID_FRACTION_OF_SECOND, INVALID_PARAMETER_VALUE, SECOND_FUNCTION_ARGUMENT_NOT_INTEGER -
22032invalid JSON text
INVALID_JSON_ROOT_FIELD, INVALID_JSON_SCHEMA_MAP_TYPE -
2203Gsql_json_item_cannot_be_cast_to_target_type
CANNOT_PARSE_JSON_FIELD -
22546The value for a routine argument is not valid.
CANNOT_DECODE_URL -
-## Class `23`: integrity constraint violation - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
23505A violation of the constraint imposed by a unique index or a unique constraint occurred.
DUPLICATED_MAP_KEY, DUPLICATE_KEY -
-## Class `2B`: dependent privilege descriptors still exist - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
2BP01dependent_objects_still_exist
SCHEMA_NOT_EMPTY -
-## Class `38`: external routine exception - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
38000external routine exception
FAILED_FUNCTION_CALL -
-## Class `39`: external routine invocation exception - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
39000external routine invocation exception
FAILED_EXECUTE_UDF -
-## Class `42`: syntax error or access rule violation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
42000syntax error or access rule violation
AMBIGUOUS_REFERENCE_TO_FIELDS, INVALID_COLUMN_OR_FIELD_DATA_TYPE, INVALID_EXTRACT_BASE_FIELD_TYPE, INVALID_EXTRACT_FIELD_TYPE, INVALID_FIELD_NAME, INVALID_SET_SYNTAX, INVALID_SQL_SYNTAX, NON_PARTITION_COLUMN, NOT_NULL_CONSTRAINT_VIOLATION, NULLABLE_COLUMN_OR_FIELD, NULLABLE_ROW_ID_ATTRIBUTES -
42001Invalid encoder error
INVALID_EXPRESSION_ENCODER -
42601A character, token, or clause is invalid or missing.
IDENTIFIER_TOO_MANY_NAME_PARTS, INVALID_EXTRACT_FIELD, INVALID_FORMAT, PARSE_SYNTAX_ERROR, UNCLOSED_BRACKETED_COMMENT -
42602A character that is invalid in a name has been detected.
INVALID_IDENTIFIER, INVALID_PROPERTY_KEY, INVALID_PROPERTY_VALUE -
42604An invalid numeric or string constant has been detected.
EMPTY_JSON_FIELD_VALUE, INVALID_TYPED_LITERAL -
42605The number of arguments specified for a scalar function is invalid.
WRONG_NUM_ARGS -
42607An operand of an aggregate function or CONCAT operator is invalid.
NESTED_AGGREGATE_FUNCTION -
42613Clauses are mutually exclusive.
INCOMPATIBLE_JOIN_TYPES, INVALID_LATERAL_JOIN_TYPE, NON_LAST_MATCHED_CLAUSE_OMIT_CONDITION, NON_LAST_NOT_MATCHED_BY_SOURCE_CLAUSE_OMIT_CONDITION, NON_LAST_NOT_MATCHED_BY_TARGET_CLAUSE_OMIT_CONDITION -
42614A duplicate keyword or clause is invalid.
REPEATED_CLAUSE -
42617The statement string is blank or empty.
PARSE_EMPTY_STATEMENT -
42702A column reference is ambiguous, because of duplicate names.
AMBIGUOUS_COLUMN_OR_FIELD, AMBIGUOUS_LATERAL_COLUMN_ALIAS -
42703An undefined column or parameter name was detected.
COLUMN_NOT_FOUND, UNRESOLVED_COLUMN, UNRESOLVED_FIELD, UNRESOLVED_MAP_KEY, UNRESOLVED_USING_COLUMN_FOR_JOIN -
42704An undefined object or constraint name was detected.
AMBIGUOUS_REFERENCE, DEFAULT_DATABASE_NOT_EXISTS, FIELD_NOT_FOUND, INDEX_NOT_FOUND, SCHEMA_NOT_FOUND, UNRECOGNIZED_SQL_TYPE -
42710A duplicate object or constraint name was detected.
CREATE_TABLE_COLUMN_OPTION_DUPLICATE, INDEX_ALREADY_EXISTS, LOCATION_ALREADY_EXISTS -
42711A duplicate column name was detected in the object definition or ALTER TABLE statement.
COLUMN_ALREADY_EXISTS -
42723A routine with the same signature already exists in the schema, module, or compound block where it is defined.
ROUTINE_ALREADY_EXISTS -
42803A column reference in the SELECT or HAVING clause is invalid, because it is not a grouping column; or a column reference in the GROUP BY clause is invalid.
GROUPING_COLUMN_MISMATCH, GROUPING_ID_COLUMN_MISMATCH, MISSING_AGGREGATION, MISSING_GROUP_BY, UNRESOLVED_ALL_IN_GROUP_BY -
42805An integer in the ORDER BY clause does not identify a column of the result table.
GROUP_BY_POS_OUT_OF_RANGE, ORDER_BY_POS_OUT_OF_RANGE -
42809The identified object is not the type of object to which the statement applies.
FORBIDDEN_OPERATION -
42818The operands of an operator or function are not compatible or comparable.
INCOMPARABLE_PIVOT_COLUMN -
42823Multiple columns are returned from a subquery that only allows one column.
INVALID_SUBQUERY_EXPRESSION -
42825The rows of UNION, INTERSECT, EXCEPT, or VALUES do not have compatible columns.
CANNOT_MERGE_INCOMPATIBLE_DATA_TYPE, INCOMPATIBLE_COLUMN_TYPE -
42826The rows of UNION, INTERSECT, EXCEPT, or VALUES do not have the same number of columns.
NUM_COLUMNS_MISMATCH -
42846Cast from source type to target type is not supported.
CANNOT_CAST_DATATYPE -
42883No routine was found with a matching signature.
ROUTINE_NOT_FOUND, UNRESOLVED_ROUTINE -
428C4The number of elements on each side of the predicate operator is not the same.
UNPIVOT_VALUE_SIZE_MISMATCH -
428EKThe schema qualifier is not valid.
TEMP_VIEW_NAME_TOO_MANY_NAME_PARTS -
428FTThe partitioning clause specified on CREATE or ALTER is not valid.
PARTITIONS_ALREADY_EXIST, PARTITIONS_NOT_FOUND -
42903Invalid use of an aggregate function or OLAP function.
GROUP_BY_AGGREGATE, GROUP_BY_POS_AGGREGATE, INVALID_WHERE_CONDITION -
429BBThe data type of a column, parameter, or SQL variable is not supported.
CANNOT_RECOGNIZE_HIVE_TYPE -
42K01data type not fully specified
DATATYPE_MISSING_SIZE, INCOMPLETE_TYPE_DEFINITION -
42K02data source not found
DATA_SOURCE_NOT_FOUND -
42K03File not found
PATH_NOT_FOUND, RENAME_SRC_PATH_NOT_FOUND -
42K04Duplicate file
FAILED_RENAME_PATH, PATH_ALREADY_EXISTS -
42K05Name is not valid
INVALID_EMPTY_LOCATION, REQUIRES_SINGLE_PART_NAMESPACE -
42K06Invalid type for options
INVALID_OPTIONS -
42K07Not a valid schema literal
INVALID_SCHEMA -
42K08Not a constant
NON_LITERAL_PIVOT_VALUES -
42K09Data type mismatch
DATATYPE_MISMATCH, PIVOT_VALUE_DATA_TYPE_MISMATCH, UNEXPECTED_INPUT_TYPE, UNPIVOT_VALUE_DATA_TYPE_MISMATCH -
42K0AInvalid UNPIVOT clause
UNPIVOT_REQUIRES_ATTRIBUTES, UNPIVOT_REQUIRES_VALUE_COLUMNS -
42K0BLegacy feature blocked
INCONSISTENT_BEHAVIOR_CROSS_VERSION -
42KD9Cannot infer table schema.
UNABLE_TO_INFER_SCHEMA -
42P01undefined_table
TABLE_OR_VIEW_NOT_FOUND, VIEW_NOT_FOUND -
42P02undefined_parameter
UNBOUND_SQL_PARAMETER -
42P06duplicate_schema
SCHEMA_ALREADY_EXISTS -
42P07duplicate_table
TABLE_OR_VIEW_ALREADY_EXISTS, TEMP_TABLE_OR_VIEW_ALREADY_EXISTS, VIEW_ALREADY_EXISTS -
42P20windowing_error
UNSUPPORTED_EXPR_FOR_WINDOW -
-## Class `46`: java ddl 1 - - - - - - - - - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
46110unsupported feature
CANNOT_MODIFY_CONFIG -
46121invalid column name
INVALID_COLUMN_NAME_AS_PATH -
-## Class `53`: insufficient resources - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
53200out_of_memory
UNABLE_TO_ACQUIRE_MEMORY -
-## Class `54`: program limit exceeded - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
54000program limit exceeded
GROUPING_SIZE_LIMIT_EXCEEDED, TOO_MANY_ARRAY_ELEMENTS -
-## Class `HY`: CLI-specific condition - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
HY008operation canceled
OPERATION_CANCELED -
-## Class `XX`: internal error - - - - - - - - - - - - -
SQLSTATEDescription and issuing error classes
XX000internal error
INTERNAL_ERROR -
diff --git a/docs/sql-error-conditions-stds-invalid-option-value-error-class.md b/docs/sql-error-conditions-stds-invalid-option-value-error-class.md deleted file mode 100644 index 7cc72417d752f..0000000000000 --- a/docs/sql-error-conditions-stds-invalid-option-value-error-class.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -layout: global -title: STDS_INVALID_OPTION_VALUE error class -displayTitle: STDS_INVALID_OPTION_VALUE error class -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. ---- - - - -[SQLSTATE: 42616](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid value for source option '``': - -This error class has the following derived error classes: - -## IS_EMPTY - -cannot be empty. - -## IS_NEGATIVE - -cannot be negative. - -## WITH_MESSAGE - -`` - - diff --git a/docs/sql-error-conditions-unresolved-column-error-class.md b/docs/sql-error-conditions-unresolved-column-error-class.md deleted file mode 100644 index 89b1daf0128df..0000000000000 --- a/docs/sql-error-conditions-unresolved-column-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: UNRESOLVED_COLUMN error class -displayTitle: UNRESOLVED_COLUMN error class -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. ---- - - - -[SQLSTATE: 42703](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -A column, variable, or function parameter with name `` cannot be resolved. - -This error class has the following derived error classes: - -## WITHOUT_SUGGESTION - - - -## WITH_SUGGESTION - -Did you mean one of the following? [``]. - - diff --git a/docs/sql-error-conditions-unresolved-field-error-class.md b/docs/sql-error-conditions-unresolved-field-error-class.md deleted file mode 100644 index 83f008139af43..0000000000000 --- a/docs/sql-error-conditions-unresolved-field-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: UNRESOLVED_FIELD error class -displayTitle: UNRESOLVED_FIELD error class -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. ---- - - - -[SQLSTATE: 42703](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -A field with name `` cannot be resolved with the struct-type column ``. - -This error class has the following derived error classes: - -## WITHOUT_SUGGESTION - - - -## WITH_SUGGESTION - -Did you mean one of the following? [``]. - - diff --git a/docs/sql-error-conditions-unresolved-map-key-error-class.md b/docs/sql-error-conditions-unresolved-map-key-error-class.md deleted file mode 100644 index 9c0268240154a..0000000000000 --- a/docs/sql-error-conditions-unresolved-map-key-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: UNRESOLVED_MAP_KEY error class -displayTitle: UNRESOLVED_MAP_KEY error class -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. ---- - - - -[SQLSTATE: 42703](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot resolve column `` as a map key. If the key is a string literal, add the single quotes '' around it. - -This error class has the following derived error classes: - -## WITHOUT_SUGGESTION - - - -## WITH_SUGGESTION - -Otherwise did you mean one of the following column(s)? [``]. - - diff --git a/docs/sql-error-conditions-unsupported-add-file-error-class.md b/docs/sql-error-conditions-unsupported-add-file-error-class.md deleted file mode 100644 index 482d753fb53b0..0000000000000 --- a/docs/sql-error-conditions-unsupported-add-file-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: UNSUPPORTED_ADD_FILE error class -displayTitle: UNSUPPORTED_ADD_FILE error class -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. ---- - - - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Don't support add file. - -This error class has the following derived error classes: - -## DIRECTORY - -The file `` is a directory, consider to set "spark.sql.legacy.addSingleFileInAddFile" to "false". - -## LOCAL_DIRECTORY - -The local directory `` is not supported in a non-local master mode. - - diff --git a/docs/sql-error-conditions-unsupported-default-value-error-class.md b/docs/sql-error-conditions-unsupported-default-value-error-class.md deleted file mode 100644 index c6ca78f606bd0..0000000000000 --- a/docs/sql-error-conditions-unsupported-default-value-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: UNSUPPORTED_DEFAULT_VALUE error class -displayTitle: UNSUPPORTED_DEFAULT_VALUE error class -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. ---- - - - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -DEFAULT column values is not supported. - -This error class has the following derived error classes: - -## WITHOUT_SUGGESTION - - - -## WITH_SUGGESTION - -Enable it by setting "spark.sql.defaultColumn.enabled" to "true". - - diff --git a/docs/sql-error-conditions-unsupported-deserializer-error-class.md b/docs/sql-error-conditions-unsupported-deserializer-error-class.md deleted file mode 100644 index 11b58f9386d05..0000000000000 --- a/docs/sql-error-conditions-unsupported-deserializer-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: UNSUPPORTED_DESERIALIZER error class -displayTitle: UNSUPPORTED_DESERIALIZER error class -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. ---- - - - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -The deserializer is not supported: - -This error class has the following derived error classes: - -## DATA_TYPE_MISMATCH - -need a(n) `` field but got ``. - -## FIELD_NUMBER_MISMATCH - -try to map `` to Tuple``, but failed as the number of fields does not line up. - - diff --git a/docs/sql-error-conditions-unsupported-feature-error-class.md b/docs/sql-error-conditions-unsupported-feature-error-class.md deleted file mode 100644 index f67d7caff63de..0000000000000 --- a/docs/sql-error-conditions-unsupported-feature-error-class.md +++ /dev/null @@ -1,229 +0,0 @@ ---- -layout: global -title: UNSUPPORTED_FEATURE error class -displayTitle: UNSUPPORTED_FEATURE error class -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. ---- - - - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -The feature is not supported: - -This error class has the following derived error classes: - -## AES_MODE - -AES-`` with the padding `` by the `` function. - -## AES_MODE_AAD - -`` with AES-`` does not support additional authenticate data (AAD). - -## AES_MODE_IV - -`` with AES-`` does not support initialization vectors (IVs). - -## ANALYZE_UNCACHED_TEMP_VIEW - -The ANALYZE TABLE FOR COLUMNS command can operate on temporary views that have been cached already. Consider to cache the view ``. - -## ANALYZE_UNSUPPORTED_COLUMN_TYPE - -The ANALYZE TABLE FOR COLUMNS command does not support the type `` of the column `` in the table ``. - -## ANALYZE_VIEW - -The ANALYZE TABLE command does not support views. - -## CATALOG_OPERATION - -Catalog `` does not support ``. - -## COLLATION - -Collation is not yet supported. - -## COMBINATION_QUERY_RESULT_CLAUSES - -Combination of ORDER BY/SORT BY/DISTRIBUTE BY/CLUSTER BY. - -## COMMENT_NAMESPACE - -Attach a comment to the namespace ``. - -## DESC_TABLE_COLUMN_PARTITION - -DESC TABLE COLUMN for a specific partition. - -## DROP_DATABASE - -Drop the default database ``. - -## DROP_NAMESPACE - -Drop the namespace ``. - -## HIVE_TABLE_TYPE - -The `` is hive ``. - -## HIVE_WITH_ANSI_INTERVALS - -Hive table `` with ANSI intervals. - -## INSERT_PARTITION_SPEC_IF_NOT_EXISTS - -INSERT INTO `` with IF NOT EXISTS in the PARTITION spec. - -## LATERAL_COLUMN_ALIAS_IN_AGGREGATE_FUNC - -Referencing a lateral column alias `` in the aggregate function ``. - -## LATERAL_COLUMN_ALIAS_IN_AGGREGATE_WITH_WINDOW_AND_HAVING - -Referencing lateral column alias `` in the aggregate query both with window expressions and with having clause. Please rewrite the aggregate query by removing the having clause or removing lateral alias reference in the SELECT list. - -## LATERAL_COLUMN_ALIAS_IN_GROUP_BY - -Referencing a lateral column alias via GROUP BY alias/ALL is not supported yet. - -## LATERAL_COLUMN_ALIAS_IN_WINDOW - -Referencing a lateral column alias `` in window expression ``. - -## LATERAL_JOIN_USING - -JOIN USING with LATERAL correlation. - -## LITERAL_TYPE - -Literal for '``' of ``. - -## MULTIPLE_BUCKET_TRANSFORMS - -Multiple bucket TRANSFORMs. - -## MULTI_ACTION_ALTER - -The target JDBC server hosting table `` does not support ALTER TABLE with multiple actions. Split the ALTER TABLE up into individual actions to avoid this error. - -## ORC_TYPE_CAST - -Unable to convert `` of Orc to data type ``. - -## OVERWRITE_BY_SUBQUERY - -INSERT OVERWRITE with a subquery condition. - -## PANDAS_UDAF_IN_PIVOT - -Pandas user defined aggregate function in the PIVOT clause. - -## PARAMETER_MARKER_IN_UNEXPECTED_STATEMENT - -Parameter markers are not allowed in ``. - -## PARTITION_WITH_NESTED_COLUMN_IS_UNSUPPORTED - -Invalid partitioning: `` is missing or is in a map or array. - -## PIVOT_AFTER_GROUP_BY - -PIVOT clause following a GROUP BY clause. Consider pushing the GROUP BY into a subquery. - -## PIVOT_TYPE - -Pivoting by the value '``' of the column data type ``. - -## PURGE_PARTITION - -Partition purge. - -## PURGE_TABLE - -Purge table. - -## PYTHON_UDF_IN_ON_CLAUSE - -Python UDF in the ON clause of a `` JOIN. In case of an INNER JOIN consider rewriting to a CROSS JOIN with a WHERE clause. - -## REMOVE_NAMESPACE_COMMENT - -Remove a comment from the namespace ``. - -## REPLACE_NESTED_COLUMN - -The replace function does not support nested column ``. - -## SET_NAMESPACE_PROPERTY - -`` is a reserved namespace property, ``. - -## SET_OPERATION_ON_MAP_TYPE - -Cannot have MAP type columns in DataFrame which calls set operations (INTERSECT, EXCEPT, etc.), but the type of column `` is ``. - -## SET_PROPERTIES_AND_DBPROPERTIES - -set PROPERTIES and DBPROPERTIES at the same time. - -## SET_TABLE_PROPERTY - -`` is a reserved table property, ``. - -## SET_VARIABLE_USING_SET - -`` is a VARIABLE and cannot be updated using the SET statement. Use SET VARIABLE `` = ... instead. - -## STATE_STORE_MULTIPLE_COLUMN_FAMILIES - -Creating multiple column families with `` is not supported. - -## STATE_STORE_REMOVING_COLUMN_FAMILIES - -Removing column families with `` is not supported. - -## STATE_STORE_TTL - -State TTL with `` is not supported. Please use RocksDBStateStoreProvider. - -## TABLE_OPERATION - -Table `` does not support ``. Please check the current catalog and namespace to make sure the qualified table name is expected, and also check the catalog implementation which is configured by "spark.sql.catalog". - -## TIME_TRAVEL - -Time travel on the relation: ``. - -## TOO_MANY_TYPE_ARGUMENTS_FOR_UDF_CLASS - -UDF class with `` type arguments. - -## TRANSFORM_DISTINCT_ALL - -TRANSFORM with the DISTINCT/ALL clause. - -## TRANSFORM_NON_HIVE - -TRANSFORM with SERDE is only supported in hive mode. - - diff --git a/docs/sql-error-conditions-unsupported-generator-error-class.md b/docs/sql-error-conditions-unsupported-generator-error-class.md deleted file mode 100644 index 4e42d6b43bca4..0000000000000 --- a/docs/sql-error-conditions-unsupported-generator-error-class.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -layout: global -title: UNSUPPORTED_GENERATOR error class -displayTitle: UNSUPPORTED_GENERATOR error class -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. ---- - - - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The generator is not supported: - -This error class has the following derived error classes: - -## MULTI_GENERATOR - -only one generator allowed per SELECT clause but found ``: ``. - -## NESTED_IN_EXPRESSIONS - -nested in expressions ``. - -## NOT_GENERATOR - -`` is expected to be a generator. However, its class is ``, which is not a generator. - -## OUTSIDE_SELECT - -outside the SELECT clause, found: ``. - - diff --git a/docs/sql-error-conditions-unsupported-insert-error-class.md b/docs/sql-error-conditions-unsupported-insert-error-class.md deleted file mode 100644 index 3f679589fd3af..0000000000000 --- a/docs/sql-error-conditions-unsupported-insert-error-class.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -layout: global -title: UNSUPPORTED_INSERT error class -displayTitle: UNSUPPORTED_INSERT error class -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. ---- - - - -[SQLSTATE: 42809](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Can't insert into the target. - -This error class has the following derived error classes: - -## MULTI_PATH - -Can only write data to relations with a single path but given paths are ``. - -## NOT_ALLOWED - -The target relation `` does not allow insertion. - -## NOT_PARTITIONED - -The target relation `` is not partitioned. - -## RDD_BASED - -An RDD-based table is not allowed. - -## READ_FROM - -The target relation `` is also being read from. - - diff --git a/docs/sql-error-conditions-unsupported-merge-condition-error-class.md b/docs/sql-error-conditions-unsupported-merge-condition-error-class.md deleted file mode 100644 index 070782395d3bc..0000000000000 --- a/docs/sql-error-conditions-unsupported-merge-condition-error-class.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -layout: global -title: UNSUPPORTED_MERGE_CONDITION error class -displayTitle: UNSUPPORTED_MERGE_CONDITION error class -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. ---- - - - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -MERGE operation contains unsupported `` condition. - -This error class has the following derived error classes: - -## AGGREGATE - -Aggregates are not allowed: ``. - -## NON_DETERMINISTIC - -Non-deterministic expressions are not allowed: ``. - -## SUBQUERY - -Subqueries are not allowed: ``. - - diff --git a/docs/sql-error-conditions-unsupported-overwrite-error-class.md b/docs/sql-error-conditions-unsupported-overwrite-error-class.md deleted file mode 100644 index dd7de62cd06d4..0000000000000 --- a/docs/sql-error-conditions-unsupported-overwrite-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: UNSUPPORTED_OVERWRITE error class -displayTitle: UNSUPPORTED_OVERWRITE error class -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. ---- - - - -[SQLSTATE: 42902](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Can't overwrite the target that is also being read from. - -This error class has the following derived error classes: - -## PATH - -The target path is ``. - -## TABLE - -The target table is ``. - - diff --git a/docs/sql-error-conditions-unsupported-save-mode-error-class.md b/docs/sql-error-conditions-unsupported-save-mode-error-class.md deleted file mode 100644 index dbe210360fcb1..0000000000000 --- a/docs/sql-error-conditions-unsupported-save-mode-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: UNSUPPORTED_SAVE_MODE error class -displayTitle: UNSUPPORTED_SAVE_MODE error class -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. ---- - - - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -The save mode `` is not supported for: - -This error class has the following derived error classes: - -## EXISTENT_PATH - -an existent path. - -## NON_EXISTENT_PATH - -a non-existent path. - - diff --git a/docs/sql-error-conditions-unsupported-subquery-expression-category-error-class.md b/docs/sql-error-conditions-unsupported-subquery-expression-category-error-class.md deleted file mode 100644 index 59a34d6a01695..0000000000000 --- a/docs/sql-error-conditions-unsupported-subquery-expression-category-error-class.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -layout: global -title: UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY error class -displayTitle: UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY error class -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. ---- - - - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Unsupported subquery expression: - -This error class has the following derived error classes: - -## ACCESSING_OUTER_QUERY_COLUMN_IS_NOT_ALLOWED - -Accessing outer query column is not allowed in this location: -`` - -## AGGREGATE_FUNCTION_MIXED_OUTER_LOCAL_REFERENCES - -Found an aggregate function in a correlated predicate that has both outer and local references, which is not supported: ``. - -## CORRELATED_COLUMN_IS_NOT_ALLOWED_IN_PREDICATE - -Correlated column is not allowed in predicate: -`` - -## CORRELATED_COLUMN_NOT_FOUND - -A correlated outer name reference within a subquery expression body was not found in the enclosing query: ``. - -## CORRELATED_REFERENCE - -Expressions referencing the outer query are not supported outside of WHERE/HAVING clauses: ``. - -## HIGHER_ORDER_FUNCTION - -Subquery expressions are not supported within higher-order functions. Please remove all subquery expressions from higher-order functions and then try the query again. - -## LATERAL_JOIN_CONDITION_NON_DETERMINISTIC - -Lateral join condition cannot be non-deterministic: ``. - -## MUST_AGGREGATE_CORRELATED_SCALAR_SUBQUERY - -Correlated scalar subqueries must be aggregated to return at most one row. - -## NON_CORRELATED_COLUMNS_IN_GROUP_BY - -A GROUP BY clause in a scalar correlated subquery cannot contain non-correlated columns: ``. - -## NON_DETERMINISTIC_LATERAL_SUBQUERIES - -Non-deterministic lateral subqueries are not supported when joining with outer relations that produce more than one row: -`` - -## UNSUPPORTED_CORRELATED_REFERENCE_DATA_TYPE - -Correlated column reference '``' cannot be `` type. - -## UNSUPPORTED_CORRELATED_SCALAR_SUBQUERY - -Correlated scalar subqueries can only be used in filters, aggregations, projections, and UPDATE/MERGE/DELETE commands: -`` - -## UNSUPPORTED_IN_EXISTS_SUBQUERY - -IN/EXISTS predicate subqueries can only be used in filters, joins, aggregations, window functions, projections, and UPDATE/MERGE/DELETE commands: -`` - -## UNSUPPORTED_TABLE_ARGUMENT - -Table arguments are used in a function where they are not supported: -`` - - diff --git a/docs/sql-error-conditions-wrong-num-args-error-class.md b/docs/sql-error-conditions-wrong-num-args-error-class.md deleted file mode 100644 index 652037bae6789..0000000000000 --- a/docs/sql-error-conditions-wrong-num-args-error-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: global -title: WRONG_NUM_ARGS error class -displayTitle: WRONG_NUM_ARGS error class -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. ---- - - - -[SQLSTATE: 42605](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The `` requires `` parameters but the actual number is ``. - -This error class has the following derived error classes: - -## WITHOUT_SUGGESTION - -Please, refer to '``/sql-ref-functions.html' for a fix. - -## WITH_SUGGESTION - -If you have to call this function with `` parameters, set the legacy configuration `` to ``. - - diff --git a/docs/sql-error-conditions.md b/docs/sql-error-conditions.md index 6b1d7c168c214..0c1953ea8f468 100644 --- a/docs/sql-error-conditions.md +++ b/docs/sql-error-conditions.md @@ -19,2885 +19,19 @@ license: | limitations under the License. --- - +{% comment %} +Don't discuss error classes (e.g. `42`) or sub-classes (e.g. `K01`) with users. It's not helpful. +Keep this documentation focused on error states (e.g. `58002`) and conditions (e.g. +`AMBIGUOUS_COLUMN_REFERENCE`), which is what users see and what they will typically be searching +for when they encounter an error. -This is a list of common, named error conditions returned by Spark SQL. +To update this information, edit `error-conditions.json`. The table below will be automatically +derived from that file via `docs/util/build-error-docs.py`. -Also see [SQLSTATE Codes](sql-error-conditions-sqlstates.html). +Also note that this is a Jekyll comment and not an HTML comment so that this comment does not show +up in the generated HTML to end users. :-) +{% endcomment %} -### AGGREGATE_FUNCTION_WITH_NONDETERMINISTIC_EXPRESSION +This is a list of error states and conditions that may be returned by Spark SQL. -[SQLSTATE: 42845](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Non-deterministic expression `` should not appear in the arguments of an aggregate function. - -### ALL_PARAMETERS_MUST_BE_NAMED - -SQLSTATE: 07001 - -Using name parameterized queries requires all parameters to be named. Parameters missing names: ``. - -### ALL_PARTITION_COLUMNS_NOT_ALLOWED - -SQLSTATE: KD005 - -Cannot use all columns for partition columns. - -### ALTER_TABLE_COLUMN_DESCRIPTOR_DUPLICATE - -[SQLSTATE: 42710](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -ALTER TABLE `` column `` specifies descriptor "``" more than once, which is invalid. - -### AMBIGUOUS_ALIAS_IN_NESTED_CTE - -[SQLSTATE: 42KD0](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Name `` is ambiguous in nested CTE. -Please set `` to "CORRECTED" so that name defined in inner CTE takes precedence. If set it to "LEGACY", outer CTE definitions will take precedence. -See '``/sql-migration-guide.html#query-engine'. - -### AMBIGUOUS_COLUMN_OR_FIELD - -[SQLSTATE: 42702](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Column or field `` is ambiguous and has `` matches. - -### AMBIGUOUS_COLUMN_REFERENCE - -[SQLSTATE: 42702](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Column `` is ambiguous. It's because you joined several DataFrame together, and some of these DataFrames are the same. -This column points to one of the DataFrames but Spark is unable to figure out which one. -Please alias the DataFrames with different names via `DataFrame.alias` before joining them, -and specify the column using qualified name, e.g. `df.alias("a").join(df.alias("b"), col("a.id") > col("b.id"))`. - -### AMBIGUOUS_LATERAL_COLUMN_ALIAS - -[SQLSTATE: 42702](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Lateral column alias `` is ambiguous and has `` matches. - -### AMBIGUOUS_REFERENCE - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Reference `` is ambiguous, could be: ``. - -### AMBIGUOUS_REFERENCE_TO_FIELDS - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Ambiguous reference to the field ``. It appears `` times in the schema. - -### ARITHMETIC_OVERFLOW - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -``.`` If necessary set `` to "false" to bypass this error. - -### ASSIGNMENT_ARITY_MISMATCH - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The number of columns or variables assigned or aliased: `` does not match the number of source expressions: ``. - -### [AS_OF_JOIN](sql-error-conditions-as-of-join-error-class.html) - -[SQLSTATE: 42604](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid as-of join. - -For more details see [AS_OF_JOIN](sql-error-conditions-as-of-join-error-class.html) - -### AVRO_INCOMPATIBLE_READ_TYPE - -[SQLSTATE: 22KD3](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Cannot convert Avro `` to SQL `` because the original encoded data type is ``, however you're trying to read the field as ``, which would lead to an incorrect answer. -To allow reading this field, enable the SQL configuration: "spark.sql.legacy.avro.allowIncompatibleSchema". - -### BATCH_METADATA_NOT_FOUND - -[SQLSTATE: 42K03](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Unable to find batch ``. - -### BINARY_ARITHMETIC_OVERFLOW - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -`` `` `` caused overflow. - -### CALL_ON_STREAMING_DATASET_UNSUPPORTED - -[SQLSTATE: 42KDE](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The method `` can not be called on streaming Dataset/DataFrame. - -### CANNOT_ALTER_PARTITION_COLUMN - -[SQLSTATE: 428FR](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -ALTER TABLE (ALTER|CHANGE) COLUMN is not supported for partition columns, but found the partition column `` in the table ``. - -### CANNOT_CAST_DATATYPE - -[SQLSTATE: 42846](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot cast `` to ``. - -### CANNOT_CONVERT_PROTOBUF_FIELD_TYPE_TO_SQL_TYPE - -[SQLSTATE: 42846](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot convert Protobuf `` to SQL `` because schema is incompatible (protobufType = ``, sqlType = ``). - -### CANNOT_CONVERT_PROTOBUF_MESSAGE_TYPE_TO_SQL_TYPE - -[SQLSTATE: 42846](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Unable to convert `` of Protobuf to SQL type ``. - -### CANNOT_CONVERT_SQL_TYPE_TO_PROTOBUF_FIELD_TYPE - -[SQLSTATE: 42846](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot convert SQL `` to Protobuf `` because schema is incompatible (protobufType = ``, sqlType = ``). - -### CANNOT_CONVERT_SQL_VALUE_TO_PROTOBUF_ENUM_TYPE - -[SQLSTATE: 42846](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot convert SQL `` to Protobuf `` because `` is not in defined values for enum: ``. - -### [CANNOT_CREATE_DATA_SOURCE_TABLE](sql-error-conditions-cannot-create-data-source-table-error-class.html) - -[SQLSTATE: 42KDE](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to create data source table ``: - -For more details see [CANNOT_CREATE_DATA_SOURCE_TABLE](sql-error-conditions-cannot-create-data-source-table-error-class.html) - -### CANNOT_DECODE_URL - -[SQLSTATE: 22546](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The provided URL cannot be decoded: ``. Please ensure that the URL is properly formatted and try again. - -### CANNOT_INVOKE_IN_TRANSFORMATIONS - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Dataset transformations and actions can only be invoked by the driver, not inside of other Dataset transformations; for example, dataset1.map(x => dataset2.values.count() * x) is invalid because the values transformation and count action cannot be performed inside of the dataset1.map transformation. For more information, see SPARK-28702. - -### CANNOT_LOAD_FUNCTION_CLASS - -[SQLSTATE: 46103](sql-error-conditions-sqlstates.html#class-46-java-ddl-1) - -Cannot load class `` when registering the function ``, please make sure it is on the classpath. - -### CANNOT_LOAD_PROTOBUF_CLASS - -[SQLSTATE: 42K03](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Could not load Protobuf class with name ``. ``. - -### [CANNOT_LOAD_STATE_STORE](sql-error-conditions-cannot-load-state-store-error-class.html) - -SQLSTATE: 58030 - -An error occurred during loading state. - -For more details see [CANNOT_LOAD_STATE_STORE](sql-error-conditions-cannot-load-state-store-error-class.html) - -### CANNOT_MERGE_INCOMPATIBLE_DATA_TYPE - -[SQLSTATE: 42825](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to merge incompatible data types `` and ``. 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 - -[SQLSTATE: 42KD9](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed merging schemas: -Initial schema: -`` -Schema that cannot be merged with the initial schema: -``. - -### CANNOT_MODIFY_CONFIG - -[SQLSTATE: 46110](sql-error-conditions-sqlstates.html#class-46-java-ddl-1) - -Cannot modify the value of the Spark config: ``. -See also '``/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: 22006](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Unable to parse ``. 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_JSON_FIELD - -[SQLSTATE: 2203G](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Cannot parse the field name `` and the value `` of the JSON token type `` to target Spark data type ``. - -### CANNOT_PARSE_PROTOBUF_DESCRIPTOR - -[SQLSTATE: 22018](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Error parsing descriptor bytes into Protobuf FileDescriptorSet. - -### CANNOT_PARSE_TIMESTAMP - -[SQLSTATE: 22007](sql-error-conditions-sqlstates.html#class-22-data-exception) - -``. If necessary set `` to "false" to bypass this error. - -### CANNOT_RECOGNIZE_HIVE_TYPE - -[SQLSTATE: 429BB](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot recognize hive type string: ``, column: ``. 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 - -[SQLSTATE: 0AKD0](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Renaming a `` across schemas is not allowed. - -### CANNOT_RESOLVE_DATAFRAME_COLUMN - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot resolve dataframe column ``. It's probably because of illegal references like `df1.select(df2.col("a"))`. - -### CANNOT_RESOLVE_STAR_EXPAND - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot resolve ``.* given input columns ``. Please check that the specified table or struct exists and is accessible in the input columns. - -### CANNOT_RESTORE_PERMISSIONS_FOR_PATH - -SQLSTATE: 58030 - -Failed to set permissions on created path `` back to ``. - -### CANNOT_SAVE_VARIANT - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Cannot save variant data type into external storage. - -### [CANNOT_UPDATE_FIELD](sql-error-conditions-cannot-update-field-error-class.html) - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Cannot update `
` field `` type: - -For more details see [CANNOT_UPDATE_FIELD](sql-error-conditions-cannot-update-field-error-class.html) - -### CANNOT_UP_CAST_DATATYPE - -[SQLSTATE: 42846](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot up cast `` from `` to ``. -`
` - -### [CANNOT_WRITE_STATE_STORE](sql-error-conditions-cannot-write-state-store-error-class.html) - -SQLSTATE: 58030 - -Error writing state store files for provider ``. - -For more details see [CANNOT_WRITE_STATE_STORE](sql-error-conditions-cannot-write-state-store-error-class.html) - -### CAST_INVALID_INPUT - -[SQLSTATE: 22018](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The value `` of the type `` cannot be cast to `` because it is malformed. Correct the value as per the syntax, or change its target type. Use `try_cast` to tolerate malformed input and return NULL instead. If necessary set `` to "false" to bypass this error. - -### CAST_OVERFLOW - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The value `` of the type `` cannot be cast to `` due to an overflow. Use `try_cast` to tolerate overflow and return NULL instead. If necessary set `` to "false" to bypass this error. - -### CAST_OVERFLOW_IN_TABLE_INSERT - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Fail to assign a value of `` type to the `` type column or variable `` due to an overflow. Use `try_cast` on the input value to tolerate overflow and return NULL instead. - -### CATALOG_NOT_FOUND - -[SQLSTATE: 42P08](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The catalog `` not found. Consider to set the SQL config `` to a catalog plugin. - -### CHECKPOINT_RDD_BLOCK_ID_NOT_FOUND - -SQLSTATE: 56000 - -Checkpoint block `` not found! -Either the executor that originally checkpointed this partition is no longer alive, or the original RDD is unpersisted. -If this problem persists, you may consider using `rdd.checkpoint()` instead, which is slower than local checkpointing but more fault-tolerant. - -### CLASS_NOT_OVERRIDE_EXPECTED_METHOD - -[SQLSTATE: 38000](sql-error-conditions-sqlstates.html#class-38-external-routine-exception) - -`` must override either `` or ``. - -### CLASS_UNSUPPORTED_BY_MAP_OBJECTS - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -`MapObjects` does not support the class `` as resulting collection. - -### [CODEC_NOT_AVAILABLE](sql-error-conditions-codec-not-available-error-class.html) - -SQLSTATE: 56038 - -The codec `` is not available. - -For more details see [CODEC_NOT_AVAILABLE](sql-error-conditions-codec-not-available-error-class.html) - -### CODEC_SHORT_NAME_NOT_FOUND - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot find a short name for the codec ``. - -### COLLATION_INVALID_NAME - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The value `` does not represent a correct collation name. Suggested valid collation name: [``]. - -### [COLLATION_MISMATCH](sql-error-conditions-collation-mismatch-error-class.html) - -[SQLSTATE: 42P21](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Could not determine which collation to use for string functions and operators. - -For more details see [COLLATION_MISMATCH](sql-error-conditions-collation-mismatch-error-class.html) - -### [COLLECTION_SIZE_LIMIT_EXCEEDED](sql-error-conditions-collection-size-limit-exceeded-error-class.html) - -[SQLSTATE: 54000](sql-error-conditions-sqlstates.html#class-54-program-limit-exceeded) - -Can't create array with `` elements which exceeding the array size limit ``, - -For more details see [COLLECTION_SIZE_LIMIT_EXCEEDED](sql-error-conditions-collection-size-limit-exceeded-error-class.html) - -### COLUMN_ALIASES_NOT_ALLOWED - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Column aliases are not allowed in ``. - -### COLUMN_ALREADY_EXISTS - -[SQLSTATE: 42711](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The column `` already exists. Choose another name or rename the existing column. - -### COLUMN_NOT_DEFINED_IN_TABLE - -[SQLSTATE: 42703](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`` column `` is not defined in table ``, defined table columns are: ``. - -### COLUMN_NOT_FOUND - -[SQLSTATE: 42703](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The column `` cannot be found. Verify the spelling and correctness of the column name according to the SQL config ``. - -### COMPARATOR_RETURNS_NULL - -[SQLSTATE: 22004](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The comparator has returned a NULL for a comparison between `` and ``. -It should return a positive integer for "greater than", 0 for "equal" and a negative integer for "less than". -To revert to deprecated behavior where NULL is treated as 0 (equal), you must set "spark.sql.legacy.allowNullComparisonResultInArraySort" to "true". - -### [COMPLEX_EXPRESSION_UNSUPPORTED_INPUT](sql-error-conditions-complex-expression-unsupported-input-error-class.html) - -[SQLSTATE: 42K09](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot process input data types for the expression: ``. - -For more details see [COMPLEX_EXPRESSION_UNSUPPORTED_INPUT](sql-error-conditions-complex-expression-unsupported-input-error-class.html) - -### CONCURRENT_QUERY - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Another instance of this query was just started by a concurrent session. - -### CONCURRENT_STREAM_LOG_UPDATE - -SQLSTATE: 40000 - -Concurrent update to the log. Multiple streaming jobs detected for ``. -Please make sure only one streaming job runs on a specific checkpoint location at a time. - -### [CONNECT](sql-error-conditions-connect-error-class.html) - -SQLSTATE: 56K00 - -Generic Spark Connect error. - -For more details see [CONNECT](sql-error-conditions-connect-error-class.html) - -### CONVERSION_INVALID_INPUT - -[SQLSTATE: 22018](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The value `` (``) cannot be converted to `` because it is malformed. Correct the value as per the syntax, or change its format. Use `` to tolerate malformed input and return NULL instead. - -### CREATE_PERMANENT_VIEW_WITHOUT_ALIAS - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Not allowed to create the permanent view `` without explicitly assigning an alias for the expression ``. - -### CREATE_TABLE_COLUMN_DESCRIPTOR_DUPLICATE - -[SQLSTATE: 42710](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -CREATE TABLE column `` specifies descriptor "``" more than once, which is invalid. - -### [CREATE_VIEW_COLUMN_ARITY_MISMATCH](sql-error-conditions-create-view-column-arity-mismatch-error-class.html) - -[SQLSTATE: 21S01](sql-error-conditions-sqlstates.html#class-21-cardinality-violation) - -Cannot create view ``, the reason is - -For more details see [CREATE_VIEW_COLUMN_ARITY_MISMATCH](sql-error-conditions-create-view-column-arity-mismatch-error-class.html) - -### [DATATYPE_MISMATCH](sql-error-conditions-datatype-mismatch-error-class.html) - -[SQLSTATE: 42K09](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot resolve `` due to data type mismatch: - -For more details see [DATATYPE_MISMATCH](sql-error-conditions-datatype-mismatch-error-class.html) - -### DATATYPE_MISSING_SIZE - -[SQLSTATE: 42K01](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -DataType `` requires a length parameter, for example ``(10). Please specify the length. - -### DATA_SOURCE_ALREADY_EXISTS - -[SQLSTATE: 42710](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Data source '``' already exists. Please choose a different name for the new data source. - -### DATA_SOURCE_NOT_EXIST - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Data source '``' not found. Please make sure the data source is registered. - -### DATA_SOURCE_NOT_FOUND - -[SQLSTATE: 42K02](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to find the data source: ``. Make sure the provider name is correct and the package is properly registered and compatible with your Spark version. - -### DATA_SOURCE_TABLE_SCHEMA_MISMATCH - -[SQLSTATE: 42K03](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The schema of the data source table does not match the expected schema. If you are using the DataFrameReader.schema API or creating a table, avoid specifying the schema. -Data Source schema: `` -Expected schema: `` - -### DATETIME_OVERFLOW - -[SQLSTATE: 22008](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Datetime operation overflow: ``. - -### DECIMAL_PRECISION_EXCEEDS_MAX_PRECISION - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Decimal precision `` exceeds max precision ``. - -### DEFAULT_DATABASE_NOT_EXISTS - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Default database `` does not exist, please create it first or change default database to ````. - -### DEFAULT_PLACEMENT_INVALID - -[SQLSTATE: 42608](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -A DEFAULT keyword in a MERGE, INSERT, UPDATE, or SET VARIABLE command could not be directly assigned to a target column because it was part of an expression. -For example: `UPDATE SET c1 = DEFAULT` is allowed, but `UPDATE T SET c1 = DEFAULT + 1` is not allowed. - -### DISTINCT_WINDOW_FUNCTION_UNSUPPORTED - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Distinct window functions are not supported: ``. - -### DIVIDE_BY_ZERO - -[SQLSTATE: 22012](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Division by zero. Use `try_divide` to tolerate divisor being 0 and return NULL instead. If necessary set `` to "false" to bypass this error. - -### DUPLICATED_FIELD_NAME_IN_ARROW_STRUCT - -[SQLSTATE: 42713](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Duplicated field names in Arrow Struct are not allowed, got ``. - -### DUPLICATED_MAP_KEY - -[SQLSTATE: 23505](sql-error-conditions-sqlstates.html#class-23-integrity-constraint-violation) - -Duplicate map key `` was found, please check the input data. -If you want to remove the duplicated keys, you can set `` to "LAST_WIN" so that the key inserted at last takes precedence. - -### DUPLICATED_METRICS_NAME - -[SQLSTATE: 42710](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The metric name is not unique: ``. The same name cannot be used for metrics with different results. -However multiple instances of metrics with with same result and name are allowed (e.g. self-joins). - -### DUPLICATE_ASSIGNMENTS - -[SQLSTATE: 42701](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The columns or variables `` appear more than once as assignment targets. - -### DUPLICATE_CLAUSES - -[SQLSTATE: 42614](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Found duplicate clauses: ``. Please, remove one of them. - -### DUPLICATE_KEY - -[SQLSTATE: 23505](sql-error-conditions-sqlstates.html#class-23-integrity-constraint-violation) - -Found duplicate keys ``. - -### [DUPLICATE_ROUTINE_PARAMETER_ASSIGNMENT](sql-error-conditions-duplicate-routine-parameter-assignment-error-class.html) - -[SQLSTATE: 4274K](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Call to function `` is invalid because it includes multiple argument assignments to the same parameter name ``. - -For more details see [DUPLICATE_ROUTINE_PARAMETER_ASSIGNMENT](sql-error-conditions-duplicate-routine-parameter-assignment-error-class.html) - -### EMPTY_JSON_FIELD_VALUE - -[SQLSTATE: 42604](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to parse an empty string for data type ``. - -### ENCODER_NOT_FOUND - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Not found an encoder of the type `` to Spark SQL internal representation. -Consider to change the input type to one of supported at '``/sql-ref-datatypes.html'. - -### ERROR_READING_AVRO_UNKNOWN_FINGERPRINT - -SQLSTATE: KD00B - -Error reading avro data -- encountered an unknown fingerprint: ``, not sure what schema to use. -This could happen if you registered additional schemas after starting your spark context. - -### EVENT_TIME_IS_NOT_ON_TIMESTAMP_TYPE - -[SQLSTATE: 42K09](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The event time `` has the invalid type ``, but expected "TIMESTAMP". - -### EXCEED_LIMIT_LENGTH - -[SQLSTATE: 54006](sql-error-conditions-sqlstates.html#class-54-program-limit-exceeded) - -Exceeds char/varchar type length limitation: ``. - -### EXCEPT_NESTED_COLUMN_INVALID_TYPE - -[SQLSTATE: 428H2](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -EXCEPT column `` was resolved and expected to be StructType, but found type ``. - -### EXCEPT_OVERLAPPING_COLUMNS - -[SQLSTATE: 42702](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Columns in an EXCEPT list must be distinct and non-overlapping, but got (``). - -### EXEC_IMMEDIATE_DUPLICATE_ARGUMENT_ALIASES - -[SQLSTATE: 42701](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The USING clause of this EXECUTE IMMEDIATE command contained multiple arguments with same alias (``), which is invalid; please update the command to specify unique aliases and then try it again. - -### EXPECT_PERMANENT_VIEW_NOT_TEMP - -[SQLSTATE: 42809](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -'``' expects a permanent view but `` is a temp view. - -### [EXPECT_TABLE_NOT_VIEW](sql-error-conditions-expect-table-not-view-error-class.html) - -[SQLSTATE: 42809](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -'``' expects a table but `` is a view. - -For more details see [EXPECT_TABLE_NOT_VIEW](sql-error-conditions-expect-table-not-view-error-class.html) - -### [EXPECT_VIEW_NOT_TABLE](sql-error-conditions-expect-view-not-table-error-class.html) - -[SQLSTATE: 42809](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The table `` does not support ``. - -For more details see [EXPECT_VIEW_NOT_TABLE](sql-error-conditions-expect-view-not-table-error-class.html) - -### EXPRESSION_DECODING_FAILED - -[SQLSTATE: 42846](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to decode a row to a value of the expressions: ``. - -### EXPRESSION_ENCODING_FAILED - -[SQLSTATE: 42846](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to encode a value of the expressions: `` to a row. - -### EXPRESSION_TYPE_IS_NOT_ORDERABLE - -[SQLSTATE: 42822](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Column expression `` cannot be sorted because its type `` is not orderable. - -### FAILED_EXECUTE_UDF - -[SQLSTATE: 39000](sql-error-conditions-sqlstates.html#class-39-external-routine-invocation-exception) - -User defined function (``: (``) => ``) failed due to: ``. - -### FAILED_FUNCTION_CALL - -[SQLSTATE: 38000](sql-error-conditions-sqlstates.html#class-38-external-routine-exception) - -Failed preparing of the function `` for call. Please, double check function's arguments. - -### [FAILED_JDBC](sql-error-conditions-failed-jdbc-error-class.html) - -SQLSTATE: HV000 - -Failed JDBC `` on the operation: - -For more details see [FAILED_JDBC](sql-error-conditions-failed-jdbc-error-class.html) - -### FAILED_PARSE_STRUCT_TYPE - -[SQLSTATE: 22018](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Failed parsing struct: ``. - -### [FAILED_READ_FILE](sql-error-conditions-failed-read-file-error-class.html) - -SQLSTATE: KD001 - -Encountered error while reading file ``. - -For more details see [FAILED_READ_FILE](sql-error-conditions-failed-read-file-error-class.html) - -### FAILED_REGISTER_CLASS_WITH_KRYO - -SQLSTATE: KD000 - -Failed to register classes with Kryo. - -### FAILED_RENAME_PATH - -[SQLSTATE: 42K04](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to rename `` to `` as destination already exists. - -### FAILED_RENAME_TEMP_FILE - -SQLSTATE: 58030 - -Failed to rename temp file `` to `` as FileSystem.rename returned false. - -### FAILED_ROW_TO_JSON - -[SQLSTATE: 2203G](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Failed to convert the row value `` of the class `` to the target SQL type `` in the JSON format. - -### FIELDS_ALREADY_EXISTS - -[SQLSTATE: 42710](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot `` column, because `` already exists in ``. - -### FIELD_NOT_FOUND - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -No such struct field `` in ``. - -### FORBIDDEN_OPERATION - -[SQLSTATE: 42809](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The operation `` is not allowed on the ``: ``. - -### FOREACH_BATCH_USER_FUNCTION_ERROR - -[SQLSTATE: 39000](sql-error-conditions-sqlstates.html#class-39-external-routine-invocation-exception) - -An error occurred in the user provided function in foreach batch sink. Reason: `` - -### FOUND_MULTIPLE_DATA_SOURCES - -[SQLSTATE: 42710](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Detected multiple data sources with the name '``'. Please check the data source isn't simultaneously registered and located in the classpath. - -### GENERATED_COLUMN_WITH_DEFAULT_VALUE - -[SQLSTATE: 42623](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -A column cannot have both a default value and a generation expression but column `` has default value: (``) and generation expression: (``). - -### GET_TABLES_BY_TYPE_UNSUPPORTED_BY_HIVE_VERSION - -SQLSTATE: 56038 - -Hive 2.2 and lower versions don't support getTablesByType. Please use Hive 2.3 or higher version. - -### GRAPHITE_SINK_INVALID_PROTOCOL - -SQLSTATE: KD000 - -Invalid Graphite protocol: ``. - -### GRAPHITE_SINK_PROPERTY_MISSING - -SQLSTATE: KD000 - -Graphite sink requires '``' property. - -### GROUPING_COLUMN_MISMATCH - -[SQLSTATE: 42803](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Column of grouping (``) can't be found in grouping columns ``. - -### GROUPING_ID_COLUMN_MISMATCH - -[SQLSTATE: 42803](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Columns of grouping_id (``) does not match grouping columns (``). - -### GROUPING_SIZE_LIMIT_EXCEEDED - -[SQLSTATE: 54000](sql-error-conditions-sqlstates.html#class-54-program-limit-exceeded) - -Grouping sets size cannot be greater than ``. - -### GROUP_BY_AGGREGATE - -[SQLSTATE: 42903](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Aggregate functions are not allowed in GROUP BY, but found ``. - -### GROUP_BY_POS_AGGREGATE - -[SQLSTATE: 42903](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -GROUP BY `` refers to an expression `` that contains an aggregate function. Aggregate functions are not allowed in GROUP BY. - -### GROUP_BY_POS_OUT_OF_RANGE - -[SQLSTATE: 42805](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -GROUP BY position `` is not in select list (valid range is [1, ``]). - -### GROUP_EXPRESSION_TYPE_IS_NOT_ORDERABLE - -[SQLSTATE: 42822](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The expression `` cannot be used as a grouping expression because its data type `` is not an orderable data type. - -### HLL_INVALID_INPUT_SKETCH_BUFFER - -[SQLSTATE: 22546](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Invalid call to ``; only valid HLL sketch buffers are supported as inputs (such as those produced by the `hll_sketch_agg` function). - -### HLL_INVALID_LG_K - -[SQLSTATE: 22546](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Invalid call to ``; the `lgConfigK` value must be between `` and ``, inclusive: ``. - -### HLL_UNION_DIFFERENT_LG_K - -[SQLSTATE: 22000](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Sketches have different `lgConfigK` values: `` and ``. Set the `allowDifferentLgConfigK` parameter to true to call `` with different `lgConfigK` values. - -### IDENTIFIER_TOO_MANY_NAME_PARTS - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`` is not a valid identifier as it has more than 2 name parts. - -### [ILLEGAL_STATE_STORE_VALUE](sql-error-conditions-illegal-state-store-value-error-class.html) - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Illegal value provided to the State Store - -For more details see [ILLEGAL_STATE_STORE_VALUE](sql-error-conditions-illegal-state-store-value-error-class.html) - -### INCOMPARABLE_PIVOT_COLUMN - -[SQLSTATE: 42818](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid pivot column ``. Pivot columns must be comparable. - -### INCOMPATIBLE_COLUMN_TYPE - -[SQLSTATE: 42825](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`` can only be performed on tables with compatible column types. The `` column of the `` table is `` type which is not compatible with `` at the same column of the first table.``. - -### INCOMPATIBLE_DATASOURCE_REGISTER - -SQLSTATE: 56038 - -Detected an incompatible DataSourceRegister. Please remove the incompatible library from classpath or upgrade it. Error: `` - -### [INCOMPATIBLE_DATA_FOR_TABLE](sql-error-conditions-incompatible-data-for-table-error-class.html) - -SQLSTATE: KD000 - -Cannot write incompatible data for the table ``: - -For more details see [INCOMPATIBLE_DATA_FOR_TABLE](sql-error-conditions-incompatible-data-for-table-error-class.html) - -### INCOMPATIBLE_JOIN_TYPES - -[SQLSTATE: 42613](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The join types `` and `` are incompatible. - -### INCOMPATIBLE_VIEW_SCHEMA_CHANGE - -SQLSTATE: 51024 - -The SQL query of view `` has an incompatible schema change and column `` cannot be resolved. Expected `` columns named `` but got ``. -Please try to re-create the view by running: ``. - -### [INCOMPLETE_TYPE_DEFINITION](sql-error-conditions-incomplete-type-definition-error-class.html) - -[SQLSTATE: 42K01](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Incomplete complex type: - -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) - -[SQLSTATE: 42K0B](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -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) - -### INCORRECT_RAMP_UP_RATE - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Max offset with `` rowsPerSecond is ``, but 'rampUpTimeSeconds' is ``. - -### INDETERMINATE_COLLATION - -[SQLSTATE: 42P22](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Function called requires knowledge of the collation it should apply, but indeterminate collation was found. Use COLLATE function to set the collation explicitly. - -### INDEX_ALREADY_EXISTS - -[SQLSTATE: 42710](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot create the index `` on table `` because it already exists. - -### INDEX_NOT_FOUND - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot find the index `` on table ``. - -### [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 ``, 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) - -Cannot write to '``', ``: -Table columns: ``. -Partition columns with static values: ``. -Data columns: ``. - -### [INSUFFICIENT_TABLE_PROPERTY](sql-error-conditions-insufficient-table-property-error-class.html) - -[SQLSTATE: XXKUC](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -Can't find table property: - -For more details see [INSUFFICIENT_TABLE_PROPERTY](sql-error-conditions-insufficient-table-property-error-class.html) - -### INTERNAL_ERROR - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -`` - -### INTERNAL_ERROR_BROADCAST - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -`` - -### INTERNAL_ERROR_EXECUTOR - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -`` - -### INTERNAL_ERROR_MEMORY - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -`` - -### [INTERNAL_ERROR_METADATA_CATALOG](sql-error-conditions-internal-error-metadata-catalog-error-class.html) - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -An object in the metadata catalog has been corrupted: - -For more details see [INTERNAL_ERROR_METADATA_CATALOG](sql-error-conditions-internal-error-metadata-catalog-error-class.html) - -### INTERNAL_ERROR_NETWORK - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -`` - -### INTERNAL_ERROR_SHUFFLE - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -`` - -### INTERNAL_ERROR_STORAGE - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -`` - -### INTERNAL_ERROR_TWS - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -`` - -### INTERVAL_ARITHMETIC_OVERFLOW - -[SQLSTATE: 22015](sql-error-conditions-sqlstates.html#class-22-data-exception) - -``.`` - -### INTERVAL_DIVIDED_BY_ZERO - -[SQLSTATE: 22012](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Division by zero. Use `try_divide` to tolerate divisor being 0 and return NULL instead. - -### [INVALID_AGGREGATE_FILTER](sql-error-conditions-invalid-aggregate-filter-error-class.html) - -[SQLSTATE: 42903](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The FILTER expression `` in an aggregate function is invalid. - -For more details see [INVALID_AGGREGATE_FILTER](sql-error-conditions-invalid-aggregate-filter-error-class.html) - -### INVALID_ARRAY_INDEX - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The index `` is out of bounds. The array has `` elements. Use the SQL function `get()` to tolerate accessing element at invalid index and return NULL instead. If necessary set `` to "false" to bypass this error. - -### INVALID_ARRAY_INDEX_IN_ELEMENT_AT - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The index `` is out of bounds. The array has `` elements. Use `try_element_at` to tolerate accessing element at invalid index and return NULL instead. If necessary set `` to "false" to bypass this error. - -### INVALID_BITMAP_POSITION - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The 0-indexed bitmap position `` is out of bounds. The bitmap has `` bits (`` bytes). - -### [INVALID_BOUNDARY](sql-error-conditions-invalid-boundary-error-class.html) - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The boundary `` is invalid: ``. - -For more details see [INVALID_BOUNDARY](sql-error-conditions-invalid-boundary-error-class.html) - -### INVALID_BUCKET_COLUMN_DATA_TYPE - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot use `` for bucket column. Collated data types are not supported for bucketing. - -### INVALID_BUCKET_FILE - -SQLSTATE: 58030 - -Invalid bucket file: ``. - -### INVALID_BYTE_STRING - -[SQLSTATE: 22P03](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The expected format is ByteString, but was `` (``). - -### INVALID_COLUMN_NAME_AS_PATH - -[SQLSTATE: 46121](sql-error-conditions-sqlstates.html#class-46-java-ddl-1) - -The datasource `` cannot save the column `` because its name contains some characters that are not allowed in file paths. Please, use an alias to rename it. - -### INVALID_COLUMN_OR_FIELD_DATA_TYPE - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Column or field `` is of type `` while it's required to be ``. - -### [INVALID_CONF_VALUE](sql-error-conditions-invalid-conf-value-error-class.html) - -[SQLSTATE: 22022](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The value '``' in the config "``" is invalid. - -For more details see [INVALID_CONF_VALUE](sql-error-conditions-invalid-conf-value-error-class.html) - -### [INVALID_CURSOR](sql-error-conditions-invalid-cursor-error-class.html) - -[SQLSTATE: HY109](sql-error-conditions-sqlstates.html#class-HY-cli-specific-condition) - -The cursor is invalid. - -For more details see [INVALID_CURSOR](sql-error-conditions-invalid-cursor-error-class.html) - -### [INVALID_DATETIME_PATTERN](sql-error-conditions-invalid-datetime-pattern-error-class.html) - -[SQLSTATE: 22007](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Unrecognized datetime pattern: ``. - -For more details see [INVALID_DATETIME_PATTERN](sql-error-conditions-invalid-datetime-pattern-error-class.html) - -### [INVALID_DEFAULT_VALUE](sql-error-conditions-invalid-default-value-error-class.html) - -[SQLSTATE: 42623](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to execute `` command because the destination column or variable `` has a DEFAULT value ``, - -For more details see [INVALID_DEFAULT_VALUE](sql-error-conditions-invalid-default-value-error-class.html) - -### [INVALID_DELIMITER_VALUE](sql-error-conditions-invalid-delimiter-value-error-class.html) - -[SQLSTATE: 42602](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid value for delimiter. - -For more details see [INVALID_DELIMITER_VALUE](sql-error-conditions-invalid-delimiter-value-error-class.html) - -### INVALID_DRIVER_MEMORY - -SQLSTATE: F0000 - -System memory `` must be at least ``. -Please increase heap size using the --driver-memory option or "``" in Spark configuration. - -### INVALID_EMPTY_LOCATION - -[SQLSTATE: 42K05](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The location name cannot be empty string, but ```` was given. - -### INVALID_ESC - -[SQLSTATE: 42604](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Found an invalid escape string: ``. The escape string must contain only one character. - -### INVALID_ESCAPE_CHAR - -[SQLSTATE: 42604](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`EscapeChar` should be a string literal of length one, but got ``. - -### INVALID_EXECUTOR_MEMORY - -SQLSTATE: F0000 - -Executor memory `` must be at least ``. -Please increase executor memory using the --executor-memory option or "``" in Spark configuration. - -### INVALID_EXPRESSION_ENCODER - -[SQLSTATE: 42001](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Found an invalid expression encoder. Expects an instance of ExpressionEncoder but got ``. For more information consult '``/api/java/index.html?org/apache/spark/sql/Encoder.html'. - -### INVALID_EXTRACT_BASE_FIELD_TYPE - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Can't extract a value from ``. Need a complex type [STRUCT, ARRAY, MAP] but got ``. - -### INVALID_EXTRACT_FIELD - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot extract `` from ``. - -### INVALID_EXTRACT_FIELD_TYPE - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Field name should be a non-null string literal, but it's ``. - -### INVALID_FIELD_NAME - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Field name `` is invalid: `` is not a struct. - -### [INVALID_FORMAT](sql-error-conditions-invalid-format-error-class.html) - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The format is invalid: ``. - -For more details see [INVALID_FORMAT](sql-error-conditions-invalid-format-error-class.html) - -### INVALID_FRACTION_OF_SECOND - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The fraction of sec must be zero. Valid range is [0, 60]. If necessary set `` to "false" to bypass this error. - -### [INVALID_HANDLE](sql-error-conditions-invalid-handle-error-class.html) - -[SQLSTATE: HY000](sql-error-conditions-sqlstates.html#class-HY-cli-specific-condition) - -The handle `` is invalid. - -For more details see [INVALID_HANDLE](sql-error-conditions-invalid-handle-error-class.html) - -### INVALID_IDENTIFIER - -[SQLSTATE: 42602](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The unquoted identifier `` is invalid and must be back quoted as: ````. -Unquoted identifiers can only contain ASCII letters ('a' - 'z', 'A' - 'Z'), digits ('0' - '9'), and underbar ('_'). -Unquoted identifiers must also not start with a digit. -Different data sources and meta stores may impose additional restrictions on valid identifiers. - -### INVALID_INDEX_OF_ZERO - -[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). - -### [INVALID_INLINE_TABLE](sql-error-conditions-invalid-inline-table-error-class.html) - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid inline table. - -For more details see [INVALID_INLINE_TABLE](sql-error-conditions-invalid-inline-table-error-class.html) - -### [INVALID_INTERVAL_FORMAT](sql-error-conditions-invalid-interval-format-error-class.html) - -[SQLSTATE: 22006](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Error parsing '``' to interval. Please ensure that the value provided is in a valid format for defining an interval. You can reference the documentation for the correct format. - -For more details see [INVALID_INTERVAL_FORMAT](sql-error-conditions-invalid-interval-format-error-class.html) - -### [INVALID_INVERSE_DISTRIBUTION_FUNCTION](sql-error-conditions-invalid-inverse-distribution-function-error-class.html) - -[SQLSTATE: 42K0K](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid inverse distribution function ``. - -For more details see [INVALID_INVERSE_DISTRIBUTION_FUNCTION](sql-error-conditions-invalid-inverse-distribution-function-error-class.html) - -### INVALID_JSON_DATA_TYPE - -[SQLSTATE: 2203G](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Failed to convert the JSON string '``' to a data type. Please enter a valid data type. - -### INVALID_JSON_ROOT_FIELD - -[SQLSTATE: 22032](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Cannot convert JSON root field to target Spark type. - -### INVALID_JSON_SCHEMA_MAP_TYPE - -[SQLSTATE: 22032](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Input schema `` can only contain STRING as a key type for a MAP. - -### INVALID_KRYO_SERIALIZER_BUFFER_SIZE - -SQLSTATE: F0000 - -The value of the config "``" must be less than 2048 MiB, but got `` MiB. - -### [INVALID_LAMBDA_FUNCTION_CALL](sql-error-conditions-invalid-lambda-function-call-error-class.html) - -[SQLSTATE: 42K0D](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid lambda function call. - -For more details see [INVALID_LAMBDA_FUNCTION_CALL](sql-error-conditions-invalid-lambda-function-call-error-class.html) - -### INVALID_LATERAL_JOIN_TYPE - -[SQLSTATE: 42613](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The `` 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-error-class.html) - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The limit like expression `` is invalid. - -For more details see [INVALID_LIMIT_LIKE_EXPRESSION](sql-error-conditions-invalid-limit-like-expression-error-class.html) - -### INVALID_NON_DETERMINISTIC_EXPRESSIONS - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The operator expects a deterministic expression, but the actual expression is ``. - -### INVALID_NUMERIC_LITERAL_RANGE - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Numeric literal `` is outside the valid range for `` with minimum value of `` and maximum value of ``. Please adjust the value accordingly. - -### [INVALID_OBSERVED_METRICS](sql-error-conditions-invalid-observed-metrics-error-class.html) - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -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) - -### INVALID_PANDAS_UDF_PLACEMENT - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -The group aggregate pandas UDF `` cannot be invoked together with as other, non-pandas aggregate functions. - -### [INVALID_PARAMETER_VALUE](sql-error-conditions-invalid-parameter-value-error-class.html) - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The value of parameter(s) `` in `` is invalid: - -For more details see [INVALID_PARAMETER_VALUE](sql-error-conditions-invalid-parameter-value-error-class.html) - -### INVALID_PARTITION_COLUMN_DATA_TYPE - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Cannot use `` for partition column. - -### [INVALID_PARTITION_OPERATION](sql-error-conditions-invalid-partition-operation-error-class.html) - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The partition command is invalid. - -For more details see [INVALID_PARTITION_OPERATION](sql-error-conditions-invalid-partition-operation-error-class.html) - -### INVALID_PROPERTY_KEY - -[SQLSTATE: 42602](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`` is an invalid property key, please use quotes, e.g. SET ``=``. - -### INVALID_PROPERTY_VALUE - -[SQLSTATE: 42602](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`` is an invalid property value, please use quotes, e.g. SET ``=`` - -### INVALID_QUERY_MIXED_QUERY_PARAMETERS - -[SQLSTATE: 42613](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Parameterized query must either use positional, or named parameters, but not both. - -### INVALID_SAVE_MODE - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The specified save mode `` is invalid. Valid save modes include "append", "overwrite", "ignore", "error", "errorifexists", and "default". - -### [INVALID_SCHEMA](sql-error-conditions-invalid-schema-error-class.html) - -[SQLSTATE: 42K07](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The input schema `` is not a valid schema string. - -For more details see [INVALID_SCHEMA](sql-error-conditions-invalid-schema-error-class.html) - -### INVALID_SCHEMA_OR_RELATION_NAME - -[SQLSTATE: 42602](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`` is not a valid name for tables/schemas. Valid names only contain alphabet characters, numbers and _. - -### INVALID_SET_SYNTAX - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Expected format is 'SET', 'SET key', or 'SET key=value'. If you want to include special characters in key, or include semicolon in value, please use backquotes, e.g., SET `key`=`value`. - -### INVALID_SINGLE_VARIANT_COLUMN - -[SQLSTATE: 42613](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The `singleVariantColumn` option cannot be used if there is also a user specified schema. - -### INVALID_SQL_ARG - -[SQLSTATE: 42K08](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The argument `` of `sql()` is invalid. Consider to replace it either by a SQL literal or by collection constructor functions such as `map()`, `array()`, `struct()`. - -### [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: - -For more details see [INVALID_SQL_SYNTAX](sql-error-conditions-invalid-sql-syntax-error-class.html) - -### INVALID_STATEMENT_FOR_EXECUTE_INTO - -SQLSTATE: 07501 - -The INTO clause of EXECUTE IMMEDIATE is only valid for queries but the given statement is not a query: ``. - -### INVALID_STATEMENT_OR_CLAUSE - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The statement or clause: `` is not valid. - -### [INVALID_SUBQUERY_EXPRESSION](sql-error-conditions-invalid-subquery-expression-error-class.html) - -[SQLSTATE: 42823](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid subquery: - -For more details see [INVALID_SUBQUERY_EXPRESSION](sql-error-conditions-invalid-subquery-expression-error-class.html) - -### INVALID_TEMP_OBJ_REFERENCE - -[SQLSTATE: 42K0F](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot create the persistent object `` of the type `` because it references to the temporary object `` of the type ``. Please make the temporary object `` persistent, or make the persistent object `` temporary. - -### INVALID_TIME_TRAVEL_SPEC - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot specify both version and timestamp when time travelling the table. - -### [INVALID_TIME_TRAVEL_TIMESTAMP_EXPR](sql-error-conditions-invalid-time-travel-timestamp-expr-error-class.html) - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The time travel timestamp expression `` is invalid. - -For more details see [INVALID_TIME_TRAVEL_TIMESTAMP_EXPR](sql-error-conditions-invalid-time-travel-timestamp-expr-error-class.html) - -### INVALID_TYPED_LITERAL - -[SQLSTATE: 42604](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The value of the typed literal `` is invalid: ``. - -### INVALID_UDF_IMPLEMENTATION - -[SQLSTATE: 38000](sql-error-conditions-sqlstates.html#class-38-external-routine-exception) - -Function `` does not implement a ScalarFunction or AggregateFunction. - -### INVALID_URL - -[SQLSTATE: 22P02](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The url is invalid: ``. If necessary set `` to "false" to bypass this error. - -### INVALID_USAGE_OF_STAR_OR_REGEX - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid usage of `` in ``. - -### INVALID_VARIABLE_TYPE_FOR_QUERY_EXECUTE_IMMEDIATE - -[SQLSTATE: 42K09](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Variable type must be string type but got ``. - -### INVALID_VARIANT_CAST - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The variant value ```` cannot be cast into ````. Please use `try_variant_get` instead. - -### INVALID_VARIANT_GET_PATH - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The path ```` is not a valid variant extraction path in ````. -A valid path should start with `$` and is followed by zero or more segments like `[123]`, `.name`, `['name']`, or `["name"]`. - -### INVALID_VIEW_TEXT - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -The view `` cannot be displayed due to invalid view text: ``. This may be caused by an unauthorized modification of the view or an incorrect query syntax. Please check your query syntax and verify that the view has not been tampered with. - -### INVALID_WHERE_CONDITION - -[SQLSTATE: 42903](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The WHERE condition `` contains invalid expressions: ``. -Rewrite the query to avoid window functions, aggregate functions, and generator functions in the WHERE clause. - -### INVALID_WINDOW_SPEC_FOR_AGGREGATION_FUNC - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot specify ORDER BY or a window frame for ``. - -### INVALID_WRITER_COMMIT_MESSAGE - -[SQLSTATE: 42KDE](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The data source writer has generated an invalid number of commit messages. Expected exactly one writer commit message from each task, but received ``. - -### [INVALID_WRITE_DISTRIBUTION](sql-error-conditions-invalid-write-distribution-error-class.html) - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The requested write distribution is invalid. - -For more details see [INVALID_WRITE_DISTRIBUTION](sql-error-conditions-invalid-write-distribution-error-class.html) - -### JOIN_CONDITION_IS_NOT_BOOLEAN_TYPE - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The join condition `` has the invalid type ``, expected "BOOLEAN". - -### KRYO_BUFFER_OVERFLOW - -[SQLSTATE: 54006](sql-error-conditions-sqlstates.html#class-54-program-limit-exceeded) - -Kryo serialization failed: ``. To avoid this, increase "``" value. - -### LOAD_DATA_PATH_NOT_EXISTS - -[SQLSTATE: 42K03](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -LOAD DATA input path does not exist: ``. - -### LOCAL_MUST_WITH_SCHEMA_FILE - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -LOCAL must be used together with the schema of `file`, but got: ````. - -### LOCATION_ALREADY_EXISTS - -[SQLSTATE: 42710](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot name the managed table as ``, as its associated location `` already exists. Please pick a different table name, or remove the existing location first. - -### MALFORMED_CSV_RECORD - -SQLSTATE: KD000 - -Malformed CSV record: `` - -### MALFORMED_PROTOBUF_MESSAGE - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -Malformed Protobuf messages are detected in message deserialization. Parse Mode: ``. 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-error-class.html) - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Malformed records are detected in record parsing: ``. -Parse Mode: ``. 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-error-class.html) - -### MALFORMED_VARIANT - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Variant binary is malformed. Please check the data source is valid. - -### MERGE_CARDINALITY_VIOLATION - -[SQLSTATE: 23K01](sql-error-conditions-sqlstates.html#class-23-integrity-constraint-violation) - -The ON search condition of the MERGE statement matched a single row from the target table with multiple rows of the source table. -This could result in the target row being operated on more than once with an update or delete operation and is not allowed. - -### MISSING_AGGREGATION - -[SQLSTATE: 42803](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The non-aggregating 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 `` if you do not care which of the values within a group is returned. - -### [MISSING_ATTRIBUTES](sql-error-conditions-missing-attributes-error-class.html) - -[SQLSTATE: XX000](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -Resolved attribute(s) `` missing from `` in operator ``. - -For more details see [MISSING_ATTRIBUTES](sql-error-conditions-missing-attributes-error-class.html) - -### MISSING_GROUP_BY - -[SQLSTATE: 42803](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The query does not include a GROUP BY clause. Add GROUP BY or turn it into the window functions using OVER clauses. - -### MULTIPLE_TIME_TRAVEL_SPEC - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot specify time travel in both the time travel clause and options. - -### MULTIPLE_XML_DATA_SOURCE - -[SQLSTATE: 42710](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Detected multiple data sources with the name `` (``). Please specify the fully qualified class name or remove `` from the classpath. - -### MULTI_SOURCES_UNSUPPORTED_FOR_EXPRESSION - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The expression `` does not support more than one source. - -### MULTI_UDF_INTERFACE_ERROR - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Not allowed to implement multiple UDF interfaces, UDF class ``. - -### NAMED_PARAMETERS_NOT_SUPPORTED - -[SQLSTATE: 4274K](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Named parameters are not supported for function ``; please retry the query with positional arguments to the function call instead. - -### NAMED_PARAMETER_SUPPORT_DISABLED - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Cannot call function `` because named argument references are not enabled here. -In this case, the named argument reference was ``. -Set "spark.sql.allowNamedFunctionArguments" to "true" to turn on feature. - -### NESTED_AGGREGATE_FUNCTION - -[SQLSTATE: 42607](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -It is not allowed to use an aggregate function in the argument of another aggregate function. Please use the inner aggregate function in a sub-query. - -### NESTED_EXECUTE_IMMEDIATE - -SQLSTATE: 07501 - -Nested EXECUTE IMMEDIATE commands are not allowed. Please ensure that the SQL query provided (``) does not contain another EXECUTE IMMEDIATE command. - -### NONEXISTENT_FIELD_NAME_IN_LIST - -SQLSTATE: HV091 - -Field(s) `` do(es) not exist. Available fields: `` - -### NON_FOLDABLE_ARGUMENT - -[SQLSTATE: 42K08](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The function `` requires the parameter `` to be a foldable expression of the type ``, but the actual argument is a non-foldable. - -### NON_LAST_MATCHED_CLAUSE_OMIT_CONDITION - -[SQLSTATE: 42613](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -When there are more than one MATCHED clauses in a MERGE statement, only the last MATCHED clause can omit the condition. - -### NON_LAST_NOT_MATCHED_BY_SOURCE_CLAUSE_OMIT_CONDITION - -[SQLSTATE: 42613](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -When there are more than one NOT MATCHED BY SOURCE clauses in a MERGE statement, only the last NOT MATCHED BY SOURCE clause can omit the condition. - -### NON_LAST_NOT_MATCHED_BY_TARGET_CLAUSE_OMIT_CONDITION - -[SQLSTATE: 42613](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -When there are more than one NOT MATCHED [BY TARGET] clauses in a MERGE statement, only the last NOT MATCHED [BY TARGET] clause can omit the condition. - -### NON_LITERAL_PIVOT_VALUES - -[SQLSTATE: 42K08](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Literal expressions required for pivot values, found ``. - -### NON_PARTITION_COLUMN - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -PARTITION clause cannot contain the non-partition column: ``. - -### NON_TIME_WINDOW_NOT_SUPPORTED_IN_STREAMING - -[SQLSTATE: 42KDE](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Window function is not supported in `` (as column ``) on streaming DataFrames/Datasets. -Structured Streaming only supports time-window aggregation using the WINDOW function. (window specification: ``) - -### [NOT_ALLOWED_IN_FROM](sql-error-conditions-not-allowed-in-from-error-class.html) - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Not allowed in the FROM clause: - -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) - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The expression `` used for the routine or clause `` must be a constant STRING which is NOT NULL. - -For more details see [NOT_A_CONSTANT_STRING](sql-error-conditions-not-a-constant-string-error-class.html) - -### NOT_A_PARTITIONED_TABLE - -[SQLSTATE: 42809](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Operation `` is not allowed for `` because it is not a partitioned table. - -### [NOT_NULL_CONSTRAINT_VIOLATION](sql-error-conditions-not-null-constraint-violation-error-class.html) - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -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) - -### NOT_SUPPORTED_CHANGE_COLUMN - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -ALTER TABLE ALTER/CHANGE COLUMN is not supported for changing `
`'s column `` with type `` to `` with type ``. - -### NOT_SUPPORTED_COMMAND_FOR_V2_TABLE - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -`` is not supported for v2 tables. - -### NOT_SUPPORTED_COMMAND_WITHOUT_HIVE_SUPPORT - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -`` 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-error-class.html) - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Not supported command in JDBC catalog: - -For more details see [NOT_SUPPORTED_IN_JDBC_CATALOG](sql-error-conditions-not-supported-in-jdbc-catalog-error-class.html) - -### NOT_UNRESOLVED_ENCODER - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Unresolved encoder expected, but `` was found. - -### NO_DEFAULT_COLUMN_VALUE_AVAILABLE - -[SQLSTATE: 42608](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Can't determine the default value for `` since it is not nullable and it has no default value. - -### NO_HANDLER_FOR_UDAF - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -No handler for UDAF '``'. Use sparkSession.udf.register(...) instead. - -### NO_MERGE_ACTION_SPECIFIED - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -df.mergeInto needs to be followed by at least one of whenMatched/whenNotMatched/whenNotMatchedBySource. - -### NO_SQL_TYPE_IN_PROTOBUF_SCHEMA - -[SQLSTATE: 42S22](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot find `` in Protobuf schema. - -### NO_UDF_INTERFACE - -[SQLSTATE: 38000](sql-error-conditions-sqlstates.html#class-38-external-routine-exception) - -UDF class `` doesn't implement any UDF interface. - -### NULLABLE_COLUMN_OR_FIELD - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Column or field `` is nullable while it's required to be non-nullable. - -### NULLABLE_ROW_ID_ATTRIBUTES - -[SQLSTATE: 42000](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Row ID attributes cannot be nullable: ``. - -### NULL_MAP_KEY - -[SQLSTATE: 2200E](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Cannot use null as map key. - -### NULL_QUERY_STRING_EXECUTE_IMMEDIATE - -[SQLSTATE: 22004](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Execute immediate requires a non-null variable as the query string, but the provided variable `` is null. - -### NUMERIC_OUT_OF_SUPPORTED_RANGE - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The value `` cannot be interpreted as a numeric since it has more than 38 digits. - -### [NUMERIC_VALUE_OUT_OF_RANGE](sql-error-conditions-numeric-value-out-of-range-error-class.html) - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - - - -For more details see [NUMERIC_VALUE_OUT_OF_RANGE](sql-error-conditions-numeric-value-out-of-range-error-class.html) - -### NUM_COLUMNS_MISMATCH - -[SQLSTATE: 42826](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`` can only be performed on inputs with the same number of columns, but the first input has `` columns and the `` input has `` columns. - -### NUM_TABLE_VALUE_ALIASES_MISMATCH - -[SQLSTATE: 42826](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Number of given aliases does not match number of output columns. -Function name: ``; number of aliases: ``; number of output columns: ``. - -### OPERATION_CANCELED - -[SQLSTATE: HY008](sql-error-conditions-sqlstates.html#class-HY-cli-specific-condition) - -Operation has been canceled. - -### ORDER_BY_POS_OUT_OF_RANGE - -[SQLSTATE: 42805](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -ORDER BY position `` is not in select list (valid range is [1, ``]). - -### PARSE_EMPTY_STATEMENT - -[SQLSTATE: 42617](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Syntax error, unexpected empty statement. - -### PARSE_SYNTAX_ERROR - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Syntax error at or near ````. - -### PARTITIONS_ALREADY_EXIST - -[SQLSTATE: 428FT](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot ADD or RENAME TO partition(s) `` in table `` 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 - -[SQLSTATE: 428FT](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The partition(s) `` cannot be found in table ``. -Verify the partition specification and table name. -To tolerate the error on drop use ALTER TABLE … DROP IF EXISTS PARTITION. - -### PATH_ALREADY_EXISTS - -[SQLSTATE: 42K04](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Path `` already exists. Set mode as "overwrite" to overwrite the existing path. - -### PATH_NOT_FOUND - -[SQLSTATE: 42K03](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Path does not exist: ``. - -### PIVOT_VALUE_DATA_TYPE_MISMATCH - -[SQLSTATE: 42K09](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid pivot value '``': value data type `` does not match pivot column data type ``. - -### PLAN_VALIDATION_FAILED_RULE_EXECUTOR - -[SQLSTATE: XXKD0](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -The input plan of `` is invalid: `` - -### PLAN_VALIDATION_FAILED_RULE_IN_BATCH - -[SQLSTATE: XXKD0](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -Rule `` in batch `` generated an invalid plan: `` - -### PROTOBUF_DEPENDENCY_NOT_FOUND - -[SQLSTATE: 42K0G](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Could not find dependency: ``. - -### PROTOBUF_DESCRIPTOR_FILE_NOT_FOUND - -[SQLSTATE: 42K0G](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Error reading Protobuf descriptor file at path: ``. - -### PROTOBUF_FIELD_MISSING - -[SQLSTATE: 42K0G](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Searching for `` in Protobuf schema at `` gave `` matches. Candidates: ``. - -### PROTOBUF_FIELD_MISSING_IN_SQL_SCHEMA - -[SQLSTATE: 42K0G](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Found `` in Protobuf schema but there is no match in the SQL schema. - -### PROTOBUF_FIELD_TYPE_MISMATCH - -[SQLSTATE: 42K0G](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Type mismatch encountered for field: ``. - -### PROTOBUF_MESSAGE_NOT_FOUND - -[SQLSTATE: 42K0G](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Unable to locate Message `` in Descriptor. - -### PROTOBUF_TYPE_NOT_SUPPORT - -[SQLSTATE: 42K0G](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Protobuf type not yet supported: ``. - -### PYTHON_DATA_SOURCE_ERROR - -[SQLSTATE: 38000](sql-error-conditions-sqlstates.html#class-38-external-routine-exception) - -Failed to `` Python data source ``: `` - -### PYTHON_STREAMING_DATA_SOURCE_RUNTIME_ERROR - -[SQLSTATE: 38000](sql-error-conditions-sqlstates.html#class-38-external-routine-exception) - -Failed when Python streaming data source perform ``: `` - -### RECURSIVE_PROTOBUF_SCHEMA - -[SQLSTATE: 42K0G](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Found recursive reference in Protobuf schema, which can not be processed by Spark by default: ``. try setting the option `recursive.fields.max.depth` 0 to 10. Going beyond 10 levels of recursion is not allowed. - -### RECURSIVE_VIEW - -[SQLSTATE: 42K0H](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Recursive view `` detected (cycle: ``). - -### REF_DEFAULT_VALUE_IS_NOT_ALLOWED_IN_PARTITION - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -References to DEFAULT column values are not allowed within the PARTITION clause. - -### RENAME_SRC_PATH_NOT_FOUND - -[SQLSTATE: 42K03](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to rename as `` was not found. - -### REPEATED_CLAUSE - -[SQLSTATE: 42614](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The `` clause may be used at most once per `` operation. - -### REQUIRED_PARAMETER_NOT_FOUND - -[SQLSTATE: 4274K](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot invoke function `` because the parameter named `` is required, but the function call did not supply a value. Please update the function call to supply an argument value (either positionally at index `` or by name) and retry the query again. - -### REQUIRES_SINGLE_PART_NAMESPACE - -[SQLSTATE: 42K05](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`` requires a single-part namespace, but got ``. - -### ROUTINE_ALREADY_EXISTS - -[SQLSTATE: 42723](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot create the function `` 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 - -[SQLSTATE: 42883](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The function `` 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. - -### ROW_SUBQUERY_TOO_MANY_ROWS - -[SQLSTATE: 21000](sql-error-conditions-sqlstates.html#class-21-cardinality-violation) - -More than one row returned by a subquery used as a row. - -### RULE_ID_NOT_FOUND - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Not found an id for the rule name "``". Please modify RuleIdCollection.scala if you are adding a new rule. - -### SCALAR_SUBQUERY_IS_IN_GROUP_BY_OR_AGGREGATE_FUNCTION - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -The correlated scalar subquery '``' is neither present in GROUP BY, nor in an aggregate function. -Add it to GROUP BY using ordinal position or wrap it in `first()` (or `first_value`) if you don't care which value you get. - -### SCALAR_SUBQUERY_TOO_MANY_ROWS - -[SQLSTATE: 21000](sql-error-conditions-sqlstates.html#class-21-cardinality-violation) - -More than one row returned by a subquery used as an expression. - -### SCHEMA_ALREADY_EXISTS - -[SQLSTATE: 42P06](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot create schema `` 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 - -[SQLSTATE: 2BP01](sql-error-conditions-sqlstates.html#class-2B-dependent-privilege-descriptors-still-exist) - -Cannot drop a schema `` because it contains objects. -Use DROP SCHEMA ... CASCADE to drop the schema and all its objects. - -### SCHEMA_NOT_FOUND - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The schema `` 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 - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The second argument of `` function needs to be an integer. - -### SEED_EXPRESSION_IS_UNFOLDABLE - -[SQLSTATE: 42K08](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The seed expression `` of the expression `` must be foldable. - -### SORT_BY_WITHOUT_BUCKETING - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -sortBy must be used together with bucketBy. - -### SPARK_JOB_CANCELLED - -[SQLSTATE: XXKDA](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -Job `` cancelled `` - -### SPECIFY_BUCKETING_IS_NOT_ALLOWED - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -A CREATE TABLE without explicit column list cannot specify bucketing information. -Please use the form with explicit column list and specify bucketing information. -Alternatively, allow bucketing information to be inferred by omitting the clause. - -### SPECIFY_CLUSTER_BY_WITH_BUCKETING_IS_NOT_ALLOWED - -[SQLSTATE: 42908](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot specify both CLUSTER BY and CLUSTERED BY INTO BUCKETS. - -### SPECIFY_CLUSTER_BY_WITH_PARTITIONED_BY_IS_NOT_ALLOWED - -[SQLSTATE: 42908](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot specify both CLUSTER BY and PARTITIONED BY. - -### SPECIFY_PARTITION_IS_NOT_ALLOWED - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -A CREATE TABLE without explicit column list cannot specify PARTITIONED BY. -Please use the form with explicit column list and specify PARTITIONED BY. -Alternatively, allow partitioning to be inferred by omitting the PARTITION BY clause. - -### SQL_CONF_NOT_FOUND - -[SQLSTATE: 42K0I](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The SQL config `` cannot be found. Please verify that the config exists. - -### STAR_GROUP_BY_POS - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Star (*) is not allowed in a select list when GROUP BY an ordinal position is used. - -### STATEFUL_PROCESSOR_CANNOT_PERFORM_OPERATION_WITH_INVALID_HANDLE_STATE - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to perform stateful processor operation=`` with invalid handle state=``. - -### STATEFUL_PROCESSOR_CANNOT_PERFORM_OPERATION_WITH_INVALID_TIME_MODE - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to perform stateful processor operation=`` with invalid timeMode=`` - -### STATEFUL_PROCESSOR_CANNOT_REINITIALIZE_STATE_ON_KEY - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot re-initialize state on the same grouping key during initial state handling for stateful processor. Invalid grouping key=``. - -### STATEFUL_PROCESSOR_INCORRECT_TIME_MODE_TO_ASSIGN_TTL - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot use TTL for state=`` in timeMode=``, use TimeMode.ProcessingTime() instead. - -### STATEFUL_PROCESSOR_TTL_DURATION_MUST_BE_POSITIVE - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -TTL duration must be greater than zero for State store operation=`` on state=``. - -### STATE_STORE_CANNOT_CREATE_COLUMN_FAMILY_WITH_RESERVED_CHARS - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to create column family with unsupported starting character and name=``. - -### STATE_STORE_CANNOT_USE_COLUMN_FAMILY_WITH_INVALID_NAME - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to perform column family operation=`` with invalid name=``. Column family name cannot be empty or include leading/trailing spaces or use the reserved keyword=default - -### STATE_STORE_HANDLE_NOT_INITIALIZED - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The handle has not been initialized for this StatefulProcessor. -Please only use the StatefulProcessor within the transformWithState operator. - -### STATE_STORE_INCORRECT_NUM_ORDERING_COLS_FOR_RANGE_SCAN - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Incorrect number of ordering ordinals=`` for range scan encoder. The number of ordering ordinals cannot be zero or greater than number of schema columns. - -### STATE_STORE_INCORRECT_NUM_PREFIX_COLS_FOR_PREFIX_SCAN - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Incorrect number of prefix columns=`` for prefix scan encoder. Prefix columns cannot be zero or greater than or equal to num of schema columns. - -### STATE_STORE_NULL_TYPE_ORDERING_COLS_NOT_SUPPORTED - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Null type ordering column with name=`` at index=`` is not supported for range scan encoder. - -### STATE_STORE_UNSUPPORTED_OPERATION - -[SQLSTATE: XXKST](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -`` operation not supported with `` - -### STATE_STORE_UNSUPPORTED_OPERATION_BINARY_INEQUALITY - -[SQLSTATE: XXKST](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -Binary inequality column is not supported with state store. Provided schema: ``. - -### STATE_STORE_UNSUPPORTED_OPERATION_ON_MISSING_COLUMN_FAMILY - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -State store operation=`` not supported on missing column family=``. - -### STATE_STORE_VARIABLE_SIZE_ORDERING_COLS_NOT_SUPPORTED - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Variable size ordering column with name=`` at index=`` is not supported for range scan encoder. - -### STATIC_PARTITION_COLUMN_IN_INSERT_COLUMN_LIST - -[SQLSTATE: 42713](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Static partition column `` is also specified in the column list. - -### STDS_COMMITTED_BATCH_UNAVAILABLE - -SQLSTATE: KD006 - -No committed batch found, checkpoint location: ``. Ensure that the query has run and committed any microbatch before stopping. - -### STDS_CONFLICT_OPTIONS - -[SQLSTATE: 42613](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The options `` cannot be specified together. Please specify the one. - -### STDS_FAILED_TO_READ_STATE_SCHEMA - -[SQLSTATE: 42K03](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to read the state schema. Either the file does not exist, or the file is corrupted. options: ``. -Rerun the streaming query to construct the state schema, and report to the corresponding communities or vendors if the error persists. - -### STDS_INTERNAL_ERROR - -[SQLSTATE: XXKST](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -Internal error: `` -Please, report this bug to the corresponding communities or vendors, and provide the full stack trace. - -### [STDS_INVALID_OPTION_VALUE](sql-error-conditions-stds-invalid-option-value-error-class.html) - -[SQLSTATE: 42616](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Invalid value for source option '``': - -For more details see [STDS_INVALID_OPTION_VALUE](sql-error-conditions-stds-invalid-option-value-error-class.html) - -### STDS_NO_PARTITION_DISCOVERED_IN_STATE_STORE - -SQLSTATE: KD006 - -The state does not have any partition. Please double check that the query points to the valid state. options: `` - -### STDS_OFFSET_LOG_UNAVAILABLE - -SQLSTATE: KD006 - -The offset log for `` does not exist, checkpoint location: ``. -Please specify the batch ID which is available for querying - you can query the available batch IDs via using state metadata data source. - -### STDS_OFFSET_METADATA_LOG_UNAVAILABLE - -SQLSTATE: KD006 - -Metadata is not available for offset log for ``, checkpoint location: ``. -The checkpoint seems to be only run with older Spark version(s). Run the streaming query with the recent Spark version, so that Spark constructs the state metadata. - -### STDS_REQUIRED_OPTION_UNSPECIFIED - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -'``' must be specified. - -### STREAMING_STATEFUL_OPERATOR_NOT_MATCH_IN_STATE_METADATA - -[SQLSTATE: 42K03](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Streaming stateful operator name does not match with the operator in state metadata. This likely to happen when user adds/removes/changes stateful operator of existing streaming query. -Stateful operators in the metadata: [``]; Stateful operators in current batch: [``]. - -### STREAM_FAILED - -[SQLSTATE: XXKST](sql-error-conditions-sqlstates.html#class-XX-internal-error) - -Query [id = ``, runId = ``] terminated with exception: `` - -### SUM_OF_LIMIT_AND_OFFSET_EXCEEDS_MAX_INT - -[SQLSTATE: 22003](sql-error-conditions-sqlstates.html#class-22-data-exception) - -The sum of the LIMIT clause and the OFFSET clause must not be greater than the maximum 32-bit integer value (2,147,483,647) but found limit = ``, offset = ``. - -### TABLE_OR_VIEW_ALREADY_EXISTS - -[SQLSTATE: 42P07](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot create table or view `` 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 - -[SQLSTATE: 42P01](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The table or view `` 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_FAILED_TO_ANALYZE_IN_PYTHON - -[SQLSTATE: 38000](sql-error-conditions-sqlstates.html#class-38-external-routine-exception) - -Failed to analyze the Python user defined table function: `` - -### TABLE_VALUED_FUNCTION_REQUIRED_METADATA_INCOMPATIBLE_WITH_CALL - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Failed to evaluate the table function `` because its table metadata ``, but the function call ``. - -### TABLE_VALUED_FUNCTION_REQUIRED_METADATA_INVALID - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Failed to evaluate the table function `` because its table metadata was invalid; ``. - -### TABLE_VALUED_FUNCTION_TOO_MANY_TABLE_ARGUMENTS - -[SQLSTATE: 54023](sql-error-conditions-sqlstates.html#class-54-program-limit-exceeded) - -There are too many table arguments for table-valued function. -It allows one table argument, but got: ``. -If you want to allow it, please set "spark.sql.allowMultipleTableArguments.enabled" to "true" - -### TASK_WRITE_FAILED - -SQLSTATE: 58030 - -Task failed while writing rows to ``. - -### TEMP_TABLE_OR_VIEW_ALREADY_EXISTS - -[SQLSTATE: 42P07](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot create the temporary view `` 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 - -[SQLSTATE: 428EK](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -CREATE TEMPORARY VIEW or the corresponding Dataset APIs only accept single-part view names, but got: ``. - -### UDTF_ALIAS_NUMBER_MISMATCH - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The number of aliases supplied in the AS clause does not match the number of columns output by the UDTF. -Expected `` aliases, but got ``. -Please ensure that the number of aliases provided matches the number of columns output by the UDTF. - -### UDTF_INVALID_ALIAS_IN_REQUESTED_ORDERING_STRING_FROM_ANALYZE_METHOD - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to evaluate the user-defined table function because its 'analyze' method returned a requested OrderingColumn whose column name expression included an unnecessary alias ``; please remove this alias and then try the query again. - -### UDTF_INVALID_REQUESTED_SELECTED_EXPRESSION_FROM_ANALYZE_METHOD_REQUIRES_ALIAS - -[SQLSTATE: 42802](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Failed to evaluate the user-defined table function because its 'analyze' method returned a requested 'select' expression (``) that does not include a corresponding alias; please update the UDTF to specify an alias there and then try the query again. - -### UNABLE_TO_ACQUIRE_MEMORY - -[SQLSTATE: 53200](sql-error-conditions-sqlstates.html#class-53-insufficient-resources) - -Unable to acquire `` bytes of memory, got ``. - -### UNABLE_TO_CONVERT_TO_PROTOBUF_MESSAGE_TYPE - -[SQLSTATE: 42K0G](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Unable to convert SQL type `` to Protobuf type ``. - -### UNABLE_TO_FETCH_HIVE_TABLES - -SQLSTATE: 58030 - -Unable to fetch tables of Hive database: ``. - -### UNABLE_TO_INFER_SCHEMA - -[SQLSTATE: 42KD9](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Unable to infer schema for ``. It must be specified manually. - -### UNBOUND_SQL_PARAMETER - -[SQLSTATE: 42P02](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Found the unbound parameter: ``. Please, fix `args` and provide a mapping of the parameter to either a SQL literal or collection constructor functions such as `map()`, `array()`, `struct()`. - -### UNCLOSED_BRACKETED_COMMENT - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Found an unclosed bracketed comment. Please, append */ at the end of the comment. - -### UNEXPECTED_INPUT_TYPE - -[SQLSTATE: 42K09](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Parameter `` of function `` requires the `` type, however `` has the type ``. - -### UNEXPECTED_POSITIONAL_ARGUMENT - -[SQLSTATE: 4274K](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot invoke function `` because it contains positional argument(s) following the named argument assigned to ``; please rearrange them so the positional arguments come first and then retry the query again. - -### UNEXPECTED_SERIALIZER_FOR_CLASS - -[SQLSTATE: 42846](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The class `` has an unexpected expression serializer. Expects "STRUCT" or "IF" which returns "STRUCT" but found ``. - -### UNKNOWN_PROTOBUF_MESSAGE_TYPE - -[SQLSTATE: 42K0G](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Attempting to treat `` as a Message, but it was ``. - -### UNPIVOT_REQUIRES_ATTRIBUTES - -[SQLSTATE: 42K0A](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -UNPIVOT requires all given `` expressions to be columns when no `` expressions are given. These are not columns: [``]. - -### UNPIVOT_REQUIRES_VALUE_COLUMNS - -[SQLSTATE: 42K0A](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -At least one value column needs to be specified for UNPIVOT, all columns specified as ids. - -### UNPIVOT_VALUE_DATA_TYPE_MISMATCH - -[SQLSTATE: 42K09](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Unpivot value columns must share a least common type, some types do not: [``]. - -### UNPIVOT_VALUE_SIZE_MISMATCH - -[SQLSTATE: 428C4](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -All unpivot value columns must have the same size as there are value column names (``). - -### UNRECOGNIZED_PARAMETER_NAME - -[SQLSTATE: 4274K](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot invoke function `` because the function call included a named argument reference for the argument named ``, but this function does not include any signature containing an argument with this name. Did you mean one of the following? [``]. - -### UNRECOGNIZED_SQL_TYPE - -[SQLSTATE: 42704](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Unrecognized SQL type - name: ``, id: ``. - -### UNRESOLVABLE_TABLE_VALUED_FUNCTION - -[SQLSTATE: 42883](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Could not resolve `` to a table-valued function. -Please make sure that `` is defined as a table-valued function and that all required parameters are provided correctly. -If `` 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 - -[SQLSTATE: 42803](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot infer grouping columns for GROUP BY ALL based on the select clause. Please explicitly specify the grouping columns. - -### [UNRESOLVED_COLUMN](sql-error-conditions-unresolved-column-error-class.html) - -[SQLSTATE: 42703](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -A column, variable, or function parameter with name `` cannot be resolved. - -For more details see [UNRESOLVED_COLUMN](sql-error-conditions-unresolved-column-error-class.html) - -### [UNRESOLVED_FIELD](sql-error-conditions-unresolved-field-error-class.html) - -[SQLSTATE: 42703](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -A field with name `` cannot be resolved with the struct-type column ``. - -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) - -[SQLSTATE: 42703](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot resolve column `` 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) - -### UNRESOLVED_ROUTINE - -[SQLSTATE: 42883](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot resolve function `` on search path ``. - -### UNRESOLVED_USING_COLUMN_FOR_JOIN - -[SQLSTATE: 42703](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -USING column `` cannot be resolved on the `` side of the join. The ``-side columns: [``]. - -### UNRESOLVED_VARIABLE - -[SQLSTATE: 42883](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot resolve variable `` on search path ``. - -### UNSET_NONEXISTENT_PROPERTIES - -[SQLSTATE: 42K0J](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Attempted to unset non-existent properties [``] in table `
`. - -### [UNSUPPORTED_ADD_FILE](sql-error-conditions-unsupported-add-file-error-class.html) - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Don't support add file. - -For more details see [UNSUPPORTED_ADD_FILE](sql-error-conditions-unsupported-add-file-error-class.html) - -### UNSUPPORTED_ARROWTYPE - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Unsupported arrow type ``. - -### [UNSUPPORTED_CALL](sql-error-conditions-unsupported-call-error-class.html) - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Cannot call the method "``" of the class "``". - -For more details see [UNSUPPORTED_CALL](sql-error-conditions-unsupported-call-error-class.html) - -### UNSUPPORTED_CHAR_OR_VARCHAR_AS_STRING - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -The char/varchar type can't be used in the table schema. -If you want Spark treat them as string type as same as Spark 3.0 and earlier, please set "spark.sql.legacy.charVarcharAsString" to "true". - -### [UNSUPPORTED_COLLATION](sql-error-conditions-unsupported-collation-error-class.html) - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Collation `` is not supported for: - -For more details see [UNSUPPORTED_COLLATION](sql-error-conditions-unsupported-collation-error-class.html) - -### UNSUPPORTED_DATASOURCE_FOR_DIRECT_QUERY - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Unsupported data source type for direct query on files: `` - -### UNSUPPORTED_DATATYPE - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Unsupported data type ``. - -### UNSUPPORTED_DATA_SOURCE_SAVE_MODE - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -The data source "``" cannot be written in the `` mode. Please use either the "Append" or "Overwrite" mode instead. - -### UNSUPPORTED_DATA_TYPE_FOR_DATASOURCE - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -The `` datasource doesn't support the column `` of the type ``. - -### [UNSUPPORTED_DEFAULT_VALUE](sql-error-conditions-unsupported-default-value-error-class.html) - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -DEFAULT column values is not supported. - -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) - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -The deserializer is not supported: - -For more details see [UNSUPPORTED_DESERIALIZER](sql-error-conditions-unsupported-deserializer-error-class.html) - -### UNSUPPORTED_EXPRESSION_GENERATED_COLUMN - -[SQLSTATE: 42621](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot create generated column `` with generation expression `` because ``. - -### UNSUPPORTED_EXPR_FOR_OPERATOR - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -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: [``] - -### UNSUPPORTED_EXPR_FOR_PARAMETER - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -A query parameter contains unsupported expression. -Parameters can either be variables or literals. -Invalid expression: [``] - -### UNSUPPORTED_EXPR_FOR_WINDOW - -[SQLSTATE: 42P20](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Expression `` not supported within a window function. - -### [UNSUPPORTED_FEATURE](sql-error-conditions-unsupported-feature-error-class.html) - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -The feature is not supported: - -For more details see [UNSUPPORTED_FEATURE](sql-error-conditions-unsupported-feature-error-class.html) - -### [UNSUPPORTED_GENERATOR](sql-error-conditions-unsupported-generator-error-class.html) - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The generator is not supported: - -For more details see [UNSUPPORTED_GENERATOR](sql-error-conditions-unsupported-generator-error-class.html) - -### UNSUPPORTED_GROUPING_EXPRESSION - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -grouping()/grouping_id() can only be used with GroupingSets/Cube/Rollup. - -### [UNSUPPORTED_INSERT](sql-error-conditions-unsupported-insert-error-class.html) - -[SQLSTATE: 42809](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Can't insert into the target. - -For more details see [UNSUPPORTED_INSERT](sql-error-conditions-unsupported-insert-error-class.html) - -### [UNSUPPORTED_MERGE_CONDITION](sql-error-conditions-unsupported-merge-condition-error-class.html) - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -MERGE operation contains unsupported `` condition. - -For more details see [UNSUPPORTED_MERGE_CONDITION](sql-error-conditions-unsupported-merge-condition-error-class.html) - -### [UNSUPPORTED_OVERWRITE](sql-error-conditions-unsupported-overwrite-error-class.html) - -[SQLSTATE: 42902](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Can't overwrite the target that is also being read from. - -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) - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -The save mode `` is not supported for: - -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) - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Unsupported subquery expression: - -For more details see [UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY](sql-error-conditions-unsupported-subquery-expression-category-error-class.html) - -### UNSUPPORTED_TYPED_LITERAL - -[SQLSTATE: 0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported) - -Literals of the type `` are not supported. Supported types are ``. - -### UNTYPED_SCALA_UDF - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -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. - -### USER_RAISED_EXCEPTION - -SQLSTATE: P0001 - -`` - -### USER_RAISED_EXCEPTION_PARAMETER_MISMATCH - -SQLSTATE: P0001 - -The `raise_error()` function was used to raise error class: `` which expects parameters: ``. -The provided parameters `` do not match the expected parameters. -Please make sure to provide all expected parameters. - -### USER_RAISED_EXCEPTION_UNKNOWN_ERROR_CLASS - -SQLSTATE: P0001 - -The `raise_error()` function was used to raise an unknown error class: `` - -### VARIABLE_ALREADY_EXISTS - -[SQLSTATE: 42723](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot create the variable `` because it already exists. -Choose a different name, or drop or replace the existing variable. - -### VARIABLE_NOT_FOUND - -[SQLSTATE: 42883](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The variable `` 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 VARIABLE IF EXISTS. - -### VARIANT_CONSTRUCTOR_SIZE_LIMIT - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Cannot construct a Variant larger than 16 MiB. The maximum allowed size of a Variant value is 16 MiB. - -### VARIANT_DUPLICATE_KEY - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Failed to build variant because of a duplicate object key ````. - -### VARIANT_SIZE_LIMIT - -[SQLSTATE: 22023](sql-error-conditions-sqlstates.html#class-22-data-exception) - -Cannot build variant bigger than `` in ``. -Please avoid large input strings to this expression (for example, add function calls(s) to check the expression size and convert it to NULL first if it is too big). - -### VIEW_ALREADY_EXISTS - -[SQLSTATE: 42P07](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Cannot create view `` 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_EXCEED_MAX_NESTED_DEPTH - -[SQLSTATE: 54K00](sql-error-conditions-sqlstates.html#class-54-program-limit-exceeded) - -The depth of view `` exceeds the maximum view resolution depth (``). -Analysis is aborted to avoid errors. If you want to work around this, please try to increase the value of "spark.sql.view.maxNestedViewDepth". - -### VIEW_NOT_FOUND - -[SQLSTATE: 42P01](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The view `` 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 - -[SQLSTATE: 42K0E](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`` function can only be evaluated in an ordered row-based window frame with a single offset: ``. - -### WINDOW_FUNCTION_WITHOUT_OVER_CLAUSE - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -Window function `` requires an OVER clause. - -### WRITE_STREAM_NOT_ALLOWED - -[SQLSTATE: 42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`writeStream` can be called only on streaming Dataset/DataFrame. - -### WRONG_COMMAND_FOR_OBJECT_TYPE - -[SQLSTATE: 42809](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The operation `` requires a ``. But `` is a ``. Use `` instead. - -### [WRONG_NUM_ARGS](sql-error-conditions-wrong-num-args-error-class.html) - -[SQLSTATE: 42605](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -The `` requires `` parameters but the actual number is ``. - -For more details see [WRONG_NUM_ARGS](sql-error-conditions-wrong-num-args-error-class.html) - -### XML_ROW_TAG_MISSING - -[SQLSTATE: 42KDF](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation) - -`` option is required for reading files in XML format. +{% include_api_gen _generated/error-conditions.html %} diff --git a/docs/util/build-error-docs.py b/docs/util/build-error-docs.py new file mode 100644 index 0000000000000..df6b9e3c05270 --- /dev/null +++ b/docs/util/build-error-docs.py @@ -0,0 +1,152 @@ +""" +Generate a unified page of documentation for all error conditions. +""" +import json +import os +import re +from itertools import chain +from pathlib import Path +from textwrap import dedent + +# To avoid adding new direct dependencies, we import from within mkdocs. +# This is not ideal as unrelated updates to mkdocs may break this script. +from mkdocs.structure.pages import markdown + +THIS_DIR = Path(__file__).parent +SPARK_PROJECT_ROOT = THIS_DIR.parents[1] +DOCS_ROOT = SPARK_PROJECT_ROOT / "docs" +ERROR_CONDITIONS_PATH = ( + SPARK_PROJECT_ROOT / "common/utils/src/main/resources/error/error-conditions.json" +) + + +def assemble_message(message_parts): + message = " ".join(message_parts) + cleaned_message = re.sub(r"(<.*?>)", lambda x: f"`{x.group(1)}`", message) + return markdown.markdown(cleaned_message) + + +def load_error_conditions(path): + with open(path) as f: + raw_error_conditions = json.load(f) + error_conditions = dict() + for name, details in raw_error_conditions.items(): + if name.startswith("_LEGACY_ERROR") or name.startswith("INTERNAL_ERROR"): + continue + if "subClass" in details: + for sub_name in details["subClass"]: + details["subClass"][sub_name]["message"] = ( + assemble_message(details["subClass"][sub_name]["message"]) + ) + details["message"] = assemble_message(details["message"]) + error_conditions[name] = details + return error_conditions + + +def anchor_name(condition_name: str, sub_condition_name: str = None): + """ + URLs can, in practice, be up to 2,000 characters long without causing any issues. So we preserve + the condition name mostly as-is for use in the anchor, even when that name is very long. + See: https://stackoverflow.com/a/417184 + """ + parts = [ + part for part in (condition_name, sub_condition_name) + if part + ] + anchor = "-".join(parts).lower().replace("_", "-") + return anchor + + +def generate_doc_rows(condition_name, condition_details): + condition_row = [ + """ + + + + + + """ + .format( + anchor=anchor_name(condition_name), + sql_state=condition_details["sqlState"], + # This inserts soft break opportunities so that if a long name needs to be wrapped + # it will wrap in a visually pleasing manner. + # See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr + condition_name=condition_name.replace("_", "_"), + message=condition_details["message"], + ) + ] + sub_condition_rows = [] + if "subClass" in condition_details: + for sub_condition_name in sorted(condition_details["subClass"]): + sub_condition_rows.append( + """ + + + + + + """ + .format( + anchor=anchor_name(condition_name, sub_condition_name), + # See comment above for explanation of ``. + sub_condition_name=sub_condition_name.replace("_", "_"), + message=condition_details["subClass"][sub_condition_name]["message"], + ) + ) + doc_rows = condition_row + sub_condition_rows + return [ + dedent(row).strip() + for row in doc_rows + ] + + +def generate_doc_table(error_conditions): + doc_rows = chain.from_iterable([ + generate_doc_rows(condition_name, condition_details) + for condition_name, condition_details + in sorted( + error_conditions.items(), + key=lambda x: (x[1]["sqlState"], x[0]), + ) + ]) + table_html = ( + """ +
{sql_state} + + + # + + {condition_name} + + {message}
+ + + # + + {sub_condition_name} + + {message}
+ + + + + + {rows} +
Error State / SQLSTATEError Condition & Sub-ConditionMessage
+ """ + ) + # We dedent here rather than above so that the interpolated rows (which are not + # indented) don't prevent the dedent from working. + table_html = dedent(table_html).strip().format(rows="\n".join(list(doc_rows))) + return table_html + + +if __name__ == "__main__": + error_conditions = load_error_conditions(ERROR_CONDITIONS_PATH) + doc_table = generate_doc_table(error_conditions) + (DOCS_ROOT / "_generated").mkdir(exist_ok=True) + html_table_path = DOCS_ROOT / "_generated" / "error-conditions.html" + with open(html_table_path, "w") as f: + f.write(doc_table) + print("Generated:", os.path.relpath(html_table_path, start=SPARK_PROJECT_ROOT))