drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vrozov <...@git.apache.org>
Subject [GitHub] drill pull request #926: DRILL-5269 Make DirectSubScan Jackson JSON deserial...
Date Thu, 07 Sep 2017 22:24:56 GMT
Github user vrozov commented on a diff in the pull request:

    https://github.com/apache/drill/pull/926#discussion_r137658224
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/RecordReader.java ---
    @@ -26,6 +26,9 @@
     import org.apache.drill.exec.record.MaterializedField;
     import org.apache.drill.exec.vector.ValueVector;
     
    +import com.fasterxml.jackson.annotation.JsonTypeInfo;
    +
    +@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.WRAPPER_OBJECT, property="type")
    --- End diff --
    
    AFAIK, it will not impact implementations of the `RecordReader` interface. The annotation
affects Jackson type inference when a physical operator has a reference to a `RecordReader`
and Jackson needs to construct a concrete implementation of the `RecordReader`. Such information
needs to be passed in any case and the annotation specifies JSON syntax used to pass the type
information. To avoid the concern I'll move the annotation to the field declaration in `DirectSubScan`.
The effect of such move is that it will be necessary to annotate `RecordReader` in every operator
that may be passed as part of a fragment to a remote node for execution.  


---

Mime
View raw message