gaoran10 commented on a change in pull request #8422:
URL: https://github.com/apache/pulsar/pull/8422#discussion_r532660123
##########
File path:
pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarRecordCursor.java
##########
@@ -420,17 +435,92 @@ public boolean advanceNextPosition() {
//start time for deseralizing record
metricsTracker.start_RECORD_DESERIALIZE_TIME();
- if (this.schemaHandler instanceof KeyValueSchemaHandler) {
- ByteBuf keyByteBuf = null;
+ SchemaInfo schemaInfo;
+ try {
+ schemaInfo =
schemaInfoProvider.getSchemaByVersion(this.currentMessage.getSchemaVersion()).get();
+ } catch (InterruptedException | ExecutionException e) {
+ throw new RuntimeException(e);
+ }
+
+ Map<ColumnHandle, FieldValueProvider> currentRowValuesMap = new
HashMap<>();
+
+ if (schemaInfo.getType().equals(SchemaType.KEY_VALUE)) {
+
+ PulsarRowDecoder keyDecoder =
decoderFactory.createRowDecoder(topicName,
Review comment:
It seems that the multi-version schema decoder cache could be added and
the decoders could be reused.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]