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

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

    if (!expectedDataType.equals(actualDataType)) {
      throw new UDFInputSeriesDataTypeNotValidException(index, actualDataType, expectedDataType);
    }
    return this;
  }
Validates whether the data type of the input series at the specified column is as expected.

@param index index of the specified column
@param expectedDataType the expected data type
@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