Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16606

Throw exceptions for the data types which are not currently supported

    XMLWordPrintableJSON

Details

    • Hide
      Currently, DataTypes can be configured with some parameters, e.g., precision. However, the precision provided by users takes no effect now but a default value will always be used. This would bring some confusion to users. In this task, exceptions will be thrown if the value is not supported to make it more visible to users. Changes include:
       - the precision for TimeType could only be 0
       - the length for VarBinaryType/VarCharType could only be 0x7fffffff
       - the precision/scale for DecimalType could only be 38/18
       - the precision for TimestampType/LocalZonedTimestampType could only be 3
       - the resolution for DayTimeIntervalType could only be `SECOND` and the fractionalPrecision could only be 3
       - the resolution for YearMonthIntervalType could only be `MONTH` and the `yearPrecision` could only be 2
       - the CharType/BinaryType/ZonedTimestampType is not supported
      Show
      Currently, DataTypes can be configured with some parameters, e.g., precision. However, the precision provided by users takes no effect now but a default value will always be used. This would bring some confusion to users. In this task, exceptions will be thrown if the value is not supported to make it more visible to users. Changes include:  - the precision for TimeType could only be 0  - the length for VarBinaryType/VarCharType could only be 0x7fffffff  - the precision/scale for DecimalType could only be 38/18  - the precision for TimestampType/LocalZonedTimestampType could only be 3  - the resolution for DayTimeIntervalType could only be `SECOND` and the fractionalPrecision could only be 3  - the resolution for YearMonthIntervalType could only be `MONTH` and the `yearPrecision` could only be 2  - the CharType/BinaryType/ZonedTimestampType is not supported

    Description

      Currently, there are still cases where a data type isn't supported as the Python data type will be firstly converted to TypeInformation which will lose a few information, e.g,
       - the precision for TimeType could only be 0
       - the length for VarBinaryType/VarCharType could only be 0x7fffffff
       - the precision/scale for DecimalType could only be 38/18
       - the precision for TimestampType/LocalZonedTimestampType could only be 3
       - the resolution for DayTimeIntervalType could only be `SECOND` and the fractionalPrecision could only be 3
       - the resolution for YearMonthIntervalType could only be `MONTH` and the `yearPrecision` could only be 2
       - the CharType/BinaryType/ZonedTimestampType is not supported

      We should throw exceptions for the cases not supported.

      Attachments

        Issue Links

          Activity

            People

              dian.fu Dian Fu
              dian.fu Dian Fu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m