You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "stevenzwu (via GitHub)" <gi...@apache.org> on 2023/05/03 04:51:10 UTC

[GitHub] [iceberg] stevenzwu opened a new issue, #7507: Core: StructProjection returns a null Projection object when the nested struct is null

stevenzwu opened a new issue, #7507:
URL: https://github.com/apache/iceberg/issues/7507

   ### Apache Iceberg version
   
   1.2.1 (latest release)
   
   ### Query engine
   
   None
   
   ### Please describe the bug 🐞
   
   Today, if the nested struct is null, `StructProjection` returns a nested `StructProjection` object wraps the null struct value. It is probably simpler if a null value is returned instead. Then the projection classes like (`StructProjection` or Flink `RowDataProjection`) don't need to handle null wrapped struct.
   
   See more context in https://github.com/apache/iceberg/pull/7493#discussion_r1183232770.
   
   @rdblue @aokolnychyi @RussellSpitzer @Reo-LEI 


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] stevenzwu commented on issue #7507: API: StructProjection returns a null Projection object when the nested struct is null

Posted by "stevenzwu (via GitHub)" <gi...@apache.org>.
stevenzwu commented on issue #7507:
URL: https://github.com/apache/iceberg/issues/7507#issuecomment-1535003024

   then the Projection class doesn't have to deal with null wrapped value. e.g.
   ```
    public <T> T get(int pos, Class<T> javaClass) {
       if (struct == null) {
         // Return a null struct when projecting a nested required field from an optional struct.
         // See more details in issue #2738.
         return null;
       }
   ```
   
   it also mirroring the original struct more faithfully.
   ```
   Struct(1, null) -> StructProjection(1, null)    |   instead of StructProjection(1, StructProjection(null))
   ```


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] stevenzwu commented on issue #7507: API: StructProjection returns a null Projection object when the nested struct is null

Posted by "stevenzwu (via GitHub)" <gi...@apache.org>.
stevenzwu commented on issue #7507:
URL: https://github.com/apache/iceberg/issues/7507#issuecomment-1534976937

   if we have a schema like this
   ```
   Schema schema =
           new Schema(
               Types.NestedField.required(0, "id", Types.LongType.get()),
               Types.NestedField.optional(
                   3,
                   "location",
                   Types.StructType.of(
                       Types.NestedField.required(1, "lat", Types.FloatType.get()),
                       Types.NestedField.required(2, "long", Types.FloatType.get()))));
   ```
   
   when the nested location struct is null
   ```
   GenericRowData rowDataNullStruct = GenericRowData.of(1L, null);
   ```
   
   the StructProjection or Flink RowDataProjection would create a projection object wrapping a null struct value. I was proposing that it should just return a null projection object directly.
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   Message Russell Spitzer
   
   
   
   
   
   
   Shift + Return to add a new line
   Thread
   [commute-seattle](https://a1350286.slack.com/archives/CKACYTD51/p1683158954847069)
   
   
   
   Aswin Tekur Srinivasamurthy
     [15 hours ago](https://a1350286.slack.com/archives/CKACYTD51/p1683158954847069)
   [@Otto Melara](https://a1350286.slack.com/team/U02D7CNV9M5)
    
   [@Jesse Stanbridge](https://a1350286.slack.com/team/WNPHL3WFM)
    what’s the policy on using Lyft for late shuttles. Currently BL1710 is about 20 mins late
   :thread:
   1
   
   2 replies
   
   
   Aswin Tekur Srinivasamurthy
     [15 hours ago](https://a1350286.slack.com/archives/CKACYTD51/p1683158976676199?thread_ts=1683158954.847069&cid=CKACYTD51)
   IMG_0203
    
   IMG_0203
   
   
   
   
   Jesse Stanbridge
     [15 hours ago](https://a1350286.slack.com/archives/CKACYTD51/p1683159590854369?thread_ts=1683158954.847069&cid=CKACYTD51)
   The Lyft program only covers if a shuttle has overflowed and there's no room for you to board
   :ack:
   2
   
   
   
   
   
   
   
   
   
   
   
   
   Reply…
   Also send to commute-seattle


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] stevenzwu commented on issue #7507: API: StructProjection returns a null Projection object when the nested struct is null

Posted by "stevenzwu (via GitHub)" <gi...@apache.org>.
stevenzwu commented on issue #7507:
URL: https://github.com/apache/iceberg/issues/7507#issuecomment-1534989823

   before: `StructProjection(1, StructProjection(null))`
   after:    `StructProjection(1, null)`


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] API: StructProjection returns a null Projection object when the nested struct is null [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7507: API: StructProjection returns a null Projection object when the nested struct is null
URL: https://github.com/apache/iceberg/issues/7507


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] API: StructProjection returns a null Projection object when the nested struct is null [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7507:
URL: https://github.com/apache/iceberg/issues/7507#issuecomment-1788203155

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] API: StructProjection returns a null Projection object when the nested struct is null [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7507:
URL: https://github.com/apache/iceberg/issues/7507#issuecomment-1815527761

   This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] API: StructProjection returns a null Projection object when the nested struct is null [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on issue #7507:
URL: https://github.com/apache/iceberg/issues/7507#issuecomment-1815887798

   @stevenzwu does this still apply? If so, then we should re-open and add the `not-stale` tag so that the issue doesn't get automatically closed


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org