Class DataTypePrecisionFixer

java.lang.Object
org.apache.flink.table.runtime.types.DataTypePrecisionFixer
All Implemented Interfaces:
org.apache.flink.table.types.DataTypeVisitor<org.apache.flink.table.types.DataType>

public final class DataTypePrecisionFixer extends Object implements org.apache.flink.table.types.DataTypeVisitor<org.apache.flink.table.types.DataType>
The data type visitor used to fix the precision for data type with the given logical type which carries the correct precisions. The original data type may loses precision because of conversion from TypeInformation.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataTypePrecisionFixer(org.apache.flink.table.types.logical.LogicalType logicalType)
    Creates a new instance with the given logical type.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.table.types.DataType
    visit(org.apache.flink.table.types.AtomicDataType dataType)
     
    org.apache.flink.table.types.DataType
    visit(org.apache.flink.table.types.CollectionDataType collectionDataType)
     
    org.apache.flink.table.types.DataType
    visit(org.apache.flink.table.types.FieldsDataType fieldsDataType)
     
    org.apache.flink.table.types.DataType
    visit(org.apache.flink.table.types.KeyValueDataType keyValueDataType)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DataTypePrecisionFixer

      public DataTypePrecisionFixer(org.apache.flink.table.types.logical.LogicalType logicalType)
      Creates a new instance with the given logical type.
      Parameters:
      logicalType - the logical type which carries the correct precisions.
  • Method Details

    • visit

      public org.apache.flink.table.types.DataType visit(org.apache.flink.table.types.AtomicDataType dataType)
      Specified by:
      visit in interface org.apache.flink.table.types.DataTypeVisitor<org.apache.flink.table.types.DataType>
    • visit

      public org.apache.flink.table.types.DataType visit(org.apache.flink.table.types.CollectionDataType collectionDataType)
      Specified by:
      visit in interface org.apache.flink.table.types.DataTypeVisitor<org.apache.flink.table.types.DataType>
    • visit

      public org.apache.flink.table.types.DataType visit(org.apache.flink.table.types.FieldsDataType fieldsDataType)
      Specified by:
      visit in interface org.apache.flink.table.types.DataTypeVisitor<org.apache.flink.table.types.DataType>
    • visit

      public org.apache.flink.table.types.DataType visit(org.apache.flink.table.types.KeyValueDataType keyValueDataType)
      Specified by:
      visit in interface org.apache.flink.table.types.DataTypeVisitor<org.apache.flink.table.types.DataType>