public UDFParameterValidator validateInputSeriesDataType(int index, Type... expectedDataTypes)
      throws UDFException {
    validateInputSeriesIndex(index);

    Type actualDataType;
    actualDataType = parameters.getDataType(index);

    for (Type expectedDataType : expectedDataTypes) {
      if (expectedDataType.equals(actualDataType)) {
        return this;
      }
    }

    throw new UDFInputSeriesDataTypeNotValidException(index, actualDataType, expectedDataTypes);
  }
Validates whether the data type of the input series at the specified column is as expected.

@param index index of the specified column
@param expectedDataTypes the expected data types
@throws UDFException there are two exceptions that may be thrown:
    UDFInputSeriesIndexNotValidException and UDFInputSeriesDataTypeNotValidException
@throws UDFInputSeriesIndexNotValidException if the index of the specified column is out of
    bound
@throws UDFInputSeriesDataTypeNotValidException if the data type of the input series at the
    specified column is not as expected
iotdb-api/udf-api/src/main/java/org/apache/iotdb/udf/api/customizer/parameter/UDFParameterValidator.java