yucheng-du commented on code in PR #1547:
URL: https://github.com/apache/arrow-java/pull/1547#discussion_r4793393933


##########
flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/ArrowFlightJdbcFlightStreamResultSet.java:
##########
@@ -160,7 +162,14 @@ private void populateData() throws SQLException {
   }
 
   private void populateDataForCurrentFlightStream() throws SQLException {
-    final VectorSchemaRoot originalRoot = 
currentEndpointData.getStream().getRoot();
+    final FlightStream stream = currentEndpointData.getStream();
+    final ArrowBuf metadata = stream.getLatestMetadata();
+    latestBatchMetadata =

Review Comment:
   I checked which messages a JDBC caller can actually observe on this head. A 
local server sent progress byte 1, a first row with metadata 2, two 
progress-only messages (3 and 4), a second row without metadata, and trailer 5. 
The getter returned 1 after `executeQuery`, 2 at the first row, null at the 
second row, and 5 at EOF. Bytes 3 and 4 were never visible to the caller.
   
   That gives us two distinct behaviors to test: retaining a trailer per 
endpoint covers final query statistics, while exposing every progress message 
would require buffering those messages or delivering them as the driver reads 
them.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to