Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-137

Fix ST_Buffer for Flink to work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0

    Description

      I tried to use the ST_Buffer function on Flink, but came across the following error.

      org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: SQL validation failed. An error occurred in the type inference logic of function 'ST_Buffer'.
      
      ...
      
      Caused by: org.apache.flink.table.api.ValidationException: SQL validation failed. An error occurred in the type inference logic of function 'ST_Buffer'.
      
      ...
      
      Caused by: org.apache.flink.table.api.ValidationException: An error occurred in the type inference logic of function 'ST_Buffer'.
      
      ...
      
      Caused by: org.apache.flink.table.api.ValidationException: Could not extract a valid type inference for function class 'org.apache.sedona.flink.expressions.Functions$ST_Buffer'. Please check for implementation mistakes and/or provide a corresponding hint.
      
      ...
      
      Caused by: org.apache.flink.table.api.ValidationException: Error in extracting a signature to output mapping.
      
      ...
      
      Caused by: org.apache.flink.table.api.ValidationException: Unable to extract a type inference from method:
      
      ...
      
      Caused by: org.apache.flink.table.api.ValidationException: Could not extract a data type from 'class java.lang.Object' in parameter 0 of method 'eval' in class 'org.apache.sedona.flink.expressions.Functions$ST_Buffer'. Please pass the required data type manually or allow RAW types.
      

      It seems to be caused by the lack of @DataTypeHint for the first parameter of ST_Buffer.eval.

      Attachments

        Issue Links

          Activity

            People

              sekikn Kengo Seki
              sekikn Kengo Seki
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 0.5h
                  0.5h