athena-federation-sdk/src/main/java/com/amazonaws/athena/connector/lambda/serde/v3/ArrowRecordBatchSerDeV3.java [81:102]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public ArrowRecordBatch doDeserialize(JsonParser jparser, DeserializationContext ctxt)
                throws IOException
        {
            if (jparser.nextToken() != JsonToken.VALUE_EMBEDDED_OBJECT) {
                throw new IllegalStateException("Expecting " + JsonToken.VALUE_STRING + " but found " + jparser.getCurrentLocation());
            }
            byte[] bytes = jparser.getBinaryValue();
            AtomicReference<ArrowRecordBatch> batch = new AtomicReference<>();
            try {
                return blockAllocator.registerBatch((BufferAllocator root) -> {
                    batch.set((ArrowRecordBatch) MessageSerializer.deserializeMessageBatch(
                            new ReadChannel(Channels.newChannel(new ByteArrayInputStream(bytes))), root));
                    return batch.get();
                });
            }
            catch (Exception ex) {
                if (batch.get() != null) {
                    batch.get().close();
                }
                throw ex;
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



athena-federation-sdk/src/main/java/com/amazonaws/athena/connector/lambda/serde/v2/ArrowRecordBatchSerDe.java [92:113]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public ArrowRecordBatch doDeserialize(JsonParser jparser, DeserializationContext ctxt)
                throws IOException
        {
            if (jparser.nextToken() != JsonToken.VALUE_EMBEDDED_OBJECT) {
                throw new IllegalStateException("Expecting " + JsonToken.VALUE_STRING + " but found " + jparser.getCurrentLocation());
            }
            byte[] bytes = jparser.getBinaryValue();
            AtomicReference<ArrowRecordBatch> batch = new AtomicReference<>();
            try {
                return blockAllocator.registerBatch((BufferAllocator root) -> {
                    batch.set((ArrowRecordBatch) MessageSerializer.deserializeMessageBatch(
                            new ReadChannel(Channels.newChannel(new ByteArrayInputStream(bytes))), root));
                    return batch.get();
                });
            }
            catch (Exception ex) {
                if (batch.get() != null) {
                    batch.get().close();
                }
                throw ex;
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



