.. 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. ======================== Error classes in PySpark ======================== This is a list of common, named error classes returned by PySpark which are defined at `error_classes.py `_. When writing PySpark errors, developers must use an error class from the list. If an appropriate error class is not available, add a new one into the list. For more information, please refer to `Contributing Error and Exception `_. +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | Error class | Error message | +============================================================+==============================================================================================================+ | ARGUMENT_REQUIRED | Argument `` is required when . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | COLUMN_IN_LIST | `` does not allow a Column in a list. | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | DISALLOWED_TYPE_FOR_CONTAINER | Argument ``(`type`: ) should only contain a type in [], got | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | HIGHER_ORDER_FUNCTION_SHOULD_RETURN_COLUMN | Function `` should return Column, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_BOOL | Argument `` should be a bool, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_BOOL_OR_DICT_OR_FLOAT_OR_INT_OR_LIST_OR_STR_OR_TUPLE | Argument `` should be a bool, dict, float, int, str or tuple, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_BOOL_OR_DICT_OR_FLOAT_OR_INT_OR_STR | Argument `` should be a bool, dict, float, int or str, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_BOOL_OR_LIST | Argument `` should be a bool or list, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_BOOL_OR_STR | Argument `` should be a bool or str, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_COLUMN | Argument `` should be a Column, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_COLUMN_OR_DATATYPE_OR_STR | Argument `` should be a Column, str or DataType, but got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_COLUMN_OR_FLOAT_OR_INT_OR_LIST_OR_STR | Argument `` should be a column, float, integer, list or string, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_COLUMN_OR_INT | Argument `` should be a Column or int, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_COLUMN_OR_INT_OR_STR | Argument `` should be a Column, int or str, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_COLUMN_OR_STR | Argument `` should be a Column or str, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_DATAFRAME | Argument `` should be a DataFrame, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_DATATYPE_OR_STR | Argument `` should be a DataType or str, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_DICT | Argument `` should be a dict, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_EXPRESSION | Argument should be a Expression, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_FLOAT_OR_INT | Argument should be a float or int, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_FLOAT_OR_INT_OR_LIST_OR_STR | Argument should be a float, int, list or str, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_INT | Argument should be an int, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_ITERABLE | is not iterable. | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_LIST_OR_STR_OR_TUPLE | Argument should be a list, str or tuple, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_LIST_OR_TUPLE | Argument should be a list or tuple, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_SAME_TYPE | Argument and should be the same type, got and . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_STR | Argument should be a str, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | NOT_WINDOWSPEC | Argument should be a WindowSpec, got . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | UNSUPPORTED_NUMPY_ARRAY_SCALAR | The type of array scalar '' is not supported. | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | UNSUPPORTED_PARAM_TYPE_FOR_HIGHER_ORDER_FUNCTION | Function should use only POSITIONAL or POSITIONAL OR KEYWORD arguments. | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | WRONG_NUM_ARGS_FOR_HIGHER_ORDER_FUNCTION | Function should take between 1 and 3 arguments, but provided function takes . | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | WRONG_NUM_COLUMNS | Function should take at least columns. | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+