jackjlli commented on a change in pull request #6005:
URL: https://github.com/apache/incubator-pinot/pull/6005#discussion_r487224829
##
File path:
pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordExtractor.java
##
@@ -46,14 +46,13 @@ public void init(Set fields, @Nullable
RecordExtractorConfig recordExtra
@Override
public GenericRow extract(GenericRecord from, GenericRow to) {
if (_extractAll) {
- Map jsonMap = JsonUtils.genericRecordToJson(from);
- jsonMap.forEach((fieldName, value) -> to.putValue(fieldName,
AvroUtils.convert(value)));
+ List fields = from.getSchema().getFields();
Review comment:
Done.
##
File path:
pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordExtractor.java
##
@@ -46,14 +46,13 @@ public void init(Set fields, @Nullable
RecordExtractorConfig recordExtra
@Override
public GenericRow extract(GenericRecord from, GenericRow to) {
if (_extractAll) {
- Map jsonMap = JsonUtils.genericRecordToJson(from);
- jsonMap.forEach((fieldName, value) -> to.putValue(fieldName,
AvroUtils.convert(value)));
+ List fields = from.getSchema().getFields();
Review comment:
Done.
##
File path:
pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordExtractor.java
##
@@ -46,14 +46,13 @@ public void init(Set fields, @Nullable
RecordExtractorConfig recordExtra
@Override
public GenericRow extract(GenericRecord from, GenericRow to) {
if (_extractAll) {
- Map jsonMap = JsonUtils.genericRecordToJson(from);
- jsonMap.forEach((fieldName, value) -> to.putValue(fieldName,
AvroUtils.convert(value)));
+ List fields = from.getSchema().getFields();
Review comment:
Done.
##
File path:
pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordExtractor.java
##
@@ -46,14 +46,13 @@ public void init(Set fields, @Nullable
RecordExtractorConfig recordExtra
@Override
public GenericRow extract(GenericRecord from, GenericRow to) {
if (_extractAll) {
- Map jsonMap = JsonUtils.genericRecordToJson(from);
- jsonMap.forEach((fieldName, value) -> to.putValue(fieldName,
AvroUtils.convert(value)));
+ List fields = from.getSchema().getFields();
Review comment:
Done.
##
File path:
pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordExtractor.java
##
@@ -46,14 +46,13 @@ public void init(Set fields, @Nullable
RecordExtractorConfig recordExtra
@Override
public GenericRow extract(GenericRecord from, GenericRow to) {
if (_extractAll) {
- Map jsonMap = JsonUtils.genericRecordToJson(from);
- jsonMap.forEach((fieldName, value) -> to.putValue(fieldName,
AvroUtils.convert(value)));
+ List fields = from.getSchema().getFields();
Review comment:
Done.
##
File path:
pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordExtractor.java
##
@@ -46,14 +46,13 @@ public void init(Set fields, @Nullable
RecordExtractorConfig recordExtra
@Override
public GenericRow extract(GenericRecord from, GenericRow to) {
if (_extractAll) {
- Map jsonMap = JsonUtils.genericRecordToJson(from);
- jsonMap.forEach((fieldName, value) -> to.putValue(fieldName,
AvroUtils.convert(value)));
+ List fields = from.getSchema().getFields();
Review comment:
Done.
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:
us...@infra.apache.org
-
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org