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

Fix ST_GeoHash for Flink to work

    XMLWordPrintableJSON

Details

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

    Description

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

      org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: java.io.EOFException
      	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:372)
      	at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222)
      	at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114)
      	at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:836)
      	at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:247)
      	at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1078)
      	at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1156)
      	at org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
      	at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1156)
      Caused by: org.apache.flink.util.FlinkRuntimeException: java.io.EOFException
      	at org.apache.flink.table.data.binary.BinaryRawValueData.toObject(BinaryRawValueData.java:66)
      	at GeneratedCastExecutor$14.cast(Unknown Source)
      	at org.apache.flink.table.planner.functions.casting.RowDataToStringConverterImpl.lambda$init$0(RowDataToStringConverterImpl.java:85)
      	at org.apache.flink.table.planner.functions.casting.RowDataToStringConverterImpl.convert(RowDataToStringConverterImpl.java:98)
      	at org.apache.flink.table.utils.print.TableauStyle.rowFieldsToString(TableauStyle.java:167)
      	at org.apache.flink.table.utils.print.TableauStyle.print(TableauStyle.java:148)
      	at org.apache.flink.table.api.internal.TableResultImpl.print(TableResultImpl.java:153)
      	at org.example.App.main(App.java:22)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355)
      	... 8 more
      Caused by: java.io.EOFException
      	at java.io.DataInputStream.readFully(DataInputStream.java:197)
      	at java.io.DataInputStream.readFully(DataInputStream.java:169)
      	at org.apache.flink.table.runtime.typeutils.RawValueDataSerializer.deserialize(RawValueDataSerializer.java:96)
      	at org.apache.flink.table.runtime.typeutils.RawValueDataSerializer.deserialize(RawValueDataSerializer.java:36)
      	at org.apache.flink.util.InstantiationUtil.deserializeFromByteArray(InstantiationUtil.java:572)
      	at org.apache.flink.table.data.binary.BinaryRawValueData.toObject(BinaryRawValueData.java:64)
      	... 20 more
      

      This function returns Java's Optional, but it doesn't seem to be properly handled by Flink.

      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