hnail commented on a change in pull request #8422:
URL: https://github.com/apache/pulsar/pull/8422#discussion_r547763449
##########
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:
same as above. I proposal add another individual PR to optimize this.
----------------------------------------------------------------
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]