Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-8101

[FlightRPC][Java] Can't read/write only an empty null array

    XMLWordPrintableJSON

Details

    Description

      This is rather an edge case, but Java/Flight fails with a table consisting of only an empty null array, since it has no buffers, and Java assumes this can never happen.

      Exception in thread "main" org.apache.arrow.flight.FlightRuntimeException: CallStatus{code=CANCELLED, cause=java.lang.RuntimeException: Unexpected IO Exception, description='Failed to stream message'}
      	at org.apache.arrow.flight.CallStatus.toRuntimeException(CallStatus.java:113)
      	at org.apache.arrow.flight.grpc.StatusUtils.fromGrpcRuntimeException(StatusUtils.java:134)
      	at org.apache.arrow.flight.grpc.StatusUtils.fromThrowable(StatusUtils.java:142)
      	at org.apache.arrow.flight.FlightClient$SetStreamObserver.onError(FlightClient.java:315)
      	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:442)
      	at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
      	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
      	at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
      	at org.apache.arrow.flight.grpc.ClientInterceptorAdapter$FlightClientCallListener.onClose(ClientInterceptorAdapter.java:117)
      	at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
      	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
      	at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
      	at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:700)
      	at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
      	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
      	at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
      	at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:399)
      	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:510)
      	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:66)
      	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:630)
      	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:518)
      	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:692)
      	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:681)
      	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
      	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.RuntimeException: Unexpected IO Exception
      	at org.apache.arrow.flight.ArrowMessage.asInputStream(ArrowMessage.java:334)
      	at org.apache.arrow.flight.ArrowMessage.access$000(ArrowMessage.java:64)
      	at org.apache.arrow.flight.ArrowMessage$ArrowMessageHolderMarshaller.stream(ArrowMessage.java:382)
      	at org.apache.arrow.flight.ArrowMessage$ArrowMessageHolderMarshaller.stream(ArrowMessage.java:372)
      	at io.grpc.MethodDescriptor.streamRequest(MethodDescriptor.java:290)
      	at io.grpc.internal.ClientCallImpl.sendMessageInternal(ClientCallImpl.java:473)
      	at io.grpc.internal.ClientCallImpl.sendMessage(ClientCallImpl.java:457)
      	at io.grpc.ForwardingClientCall.sendMessage(ForwardingClientCall.java:37)
      	at io.grpc.ForwardingClientCall.sendMessage(ForwardingClientCall.java:37)
      	at io.grpc.ForwardingClientCall.sendMessage(ForwardingClientCall.java:37)
      	at io.grpc.stub.ClientCalls$CallToStreamObserverAdapter.onNext(ClientCalls.java:341)
      	at org.apache.arrow.flight.FlightClient$PutObserver.putNext(FlightClient.java:354)
      	at org.apache.arrow.flight.example.integration.IntegrationTestClient.testStream(IntegrationTestClient.java:132)
      	at org.apache.arrow.flight.example.integration.IntegrationTestClient.run(IntegrationTestClient.java:96)
      	at org.apache.arrow.flight.example.integration.IntegrationTestClient.main(IntegrationTestClient.java:69)
      Caused by: java.lang.IllegalArgumentException
      	at org.apache.arrow.util.Preconditions.checkArgument(Preconditions.java:122)
      	at org.apache.arrow.flight.ArrowMessage.asInputStream(ArrowMessage.java:294)
      	... 14 more
      

      Attachments

        Issue Links

          Activity

            People

              lidavidm David Li
              lidavidm David Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 1.5h
                  1.5h