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

pyflink DataTypes.DECIMAL is not available

    XMLWordPrintableJSON

Details

    Description

      when i use DataTypes.DECIMAL in udaf
      File "/home/ubuntu/pyflenv/lib/python3.7/site-packages/pyflink/table/types.py", line 2025, in _to_java_data_type
      _to_java_data_type(data_type._element_type))
      File "/home/ubuntu/pyflenv/lib/python3.7/site-packages/pyflink/table/types.py", line 1964, in _to_java_data_type
      j_data_type = JDataTypes.Decimal(data_type.precision, data_type.scale)
      File "/home/ubuntu/pyflenv/lib/python3.7/site-packages/py4j/java_gateway.py", line 1516, in _getattr_
      "{0}.{1} does not exist in the JVM".format(self._fqn, name))
      py4j.protocol.Py4JError: org.apache.flink.table.api.DataTypes.Decimal does not exist in the JVM

       

      in pyflink\table\types.py

      line 1963-1964

      elif isinstance(data_type, DecimalType):
          j_data_type = JDataTypes.Decimal(data_type.precision, data_type.scale)

      in java should be called "DECIMAL"

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: