Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Drill >> mail # dev >> Review Request: Adding JSONRecordReader


Copy link to this message
-
Re: Review Request: Adding JSONRecordReader

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11587/#review21278
-----------------------------------------------------------
In general, can you give a quick explanation of your design?  I'm not entirely clear at how the various schemas relate to all the other data types and schemas available in the code base.  Clearly, some stuff should be specific.  Other stuff should probably be shared across various record readers.
sandbox/prototype/common/src/main/java/org/apache/drill/common/physical/schema/Field.java
<https://reviews.apache.org/r/11587/#comment44220>

    It is not clear to me why we need this.  Can't we use the MajorType/MinorType stuff?  Can you explain why we have this as well?

sandbox/prototype/common/src/main/java/org/apache/drill/common/physical/schema/IdGenerator.java
<https://reviews.apache.org/r/11587/#comment44154>

    remove

sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/record/vector/BaseValueVector.java
<https://reviews.apache.org/r/11587/#comment44217>

    You should never pass a dead byte buf into this method.

sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/record/vector/NullableVarLen4.java
<https://reviews.apache.org/r/11587/#comment44221>

    Why are you overriding?  Isn't this exactly what the above method does?

sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/record/vector/NullableVarLen4.java
<https://reviews.apache.org/r/11587/#comment44222>

    Does this method (here in super class) also set the value to not null?

sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/record/vector/TypeHelper.java
<https://reviews.apache.org/r/11587/#comment44218>

    You shouldn't modify this block.  This block is for REQUIRED types.  For nullable, you should use the second block below that is commented out.  You can just uncomment the single NullableFixed4 value.

sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/record/vector/TypeHelper.java
<https://reviews.apache.org/r/11587/#comment44219>

    Same as issue above.

sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/schema/Field.java
<https://reviews.apache.org/r/11587/#comment44223>

    DataMode should OPTIONAL for Nullable fields.

sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/server/DrillbitContext.java
<https://reviews.apache.org/r/11587/#comment44224>

    Why did you remove these?

sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/store/JSONRecordReader.java
<https://reviews.apache.org/r/11587/#comment44225>

    Ideally, we would maintain non-changing vectors across batches rather than recreating each time.  This is fine for now, though

sandbox/prototype/pom.xml
<https://reviews.apache.org/r/11587/#comment44153>

    you need to add <scope>test</scope>
- Jacques Nadeau
On May 31, 2013, 11:47 p.m., Timothy Chen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11587/
> -----------------------------------------------------------
>
> (Updated May 31, 2013, 11:47 p.m.)
>
>
> Review request for drill and Jacques Nadeau.
>
>
> Description
> -------
>
> Added the JSONRecordReader based on the previous ScanJson work.
>  Does not support nested fields, maps or lists yet.
>  Currently it detects to move on to the next batch when any of the field batch cannot hold another item for the current item being written. This also assumes the default batch size can always hold at least one item from any field (which only is a problem for variable length vectors).
>
>
> Diffs
> -----
>
>   sandbox/prototype/common/src/main/java/org/apache/drill/common/physical/schema/DiffSchema.java PRE-CREATION
>   sandbox/prototype/common/src/main/java/org/apache/drill/common/physical/schema/Field.java PRE-CREATION