You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by Eric Erhardt <Er...@microsoft.com.INVALID> on 2020/12/16 16:45:44 UTC

Empty RecordBatch in Java Flight client

An incompatibility between the .NET and Java flight implementations was raised with https://issues.apache.org/jira/browse/ARROW-10939. From the issue:

	From investigation the java client requires the protobuf tags to be sent in the message even though it is empty. Java code can be seen here:
	https://github.com/apache/arrow/blob/master/java/flight/flight-core/src/main/java/org/apache/arrow/flight/ArrowMessage.java
	Line 257-301 (the error is that it wont accept a null body for a record batch)

	Normal functionality of gRPC is to exclude the entire tag if an object is empty, example code from generated csharp:

	if (DataBody.Length != 0)
	{ output.WriteRawTag(194, 62); output.WriteBytes(DataBody); }

The .NET code is generated by the gRPC generator (https://github.com/grpc/grpc/tree/master/src/csharp/Grpc.Tools), so it applies to all .NET gRPC code, not just Arrow Flight.

Does anyone have any thoughts/opinions on whether this should be fixed in the Java code or the .NET code? Which way aligns with the spec?

Thanks
Eric Erhardt

Re: Empty RecordBatch in Java Flight client

Posted by Wes McKinney <we...@gmail.com>.
If the manual protobuf parsing in Java is not compliant with the
Protobuf spec, then I think we should fix that.

On Wed, Dec 16, 2020 at 10:46 AM Eric Erhardt
<Er...@microsoft.com.invalid> wrote:
>
> An incompatibility between the .NET and Java flight implementations was raised with https://issues.apache.org/jira/browse/ARROW-10939. From the issue:
>
>         From investigation the java client requires the protobuf tags to be sent in the message even though it is empty. Java code can be seen here:
>         https://github.com/apache/arrow/blob/master/java/flight/flight-core/src/main/java/org/apache/arrow/flight/ArrowMessage.java
>         Line 257-301 (the error is that it wont accept a null body for a record batch)
>
>         Normal functionality of gRPC is to exclude the entire tag if an object is empty, example code from generated csharp:
>
>         if (DataBody.Length != 0)
>         { output.WriteRawTag(194, 62); output.WriteBytes(DataBody); }
>
> The .NET code is generated by the gRPC generator (https://github.com/grpc/grpc/tree/master/src/csharp/Grpc.Tools), so it applies to all .NET gRPC code, not just Arrow Flight.
>
> Does anyone have any thoughts/opinions on whether this should be fixed in the Java code or the .NET code? Which way aligns with the spec?
>
> Thanks
> Eric Erhardt