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

[GitHub] [iceberg] ChristinaTech opened a new issue, #7623: Spark shows incorrect count for incremental read in some cases.

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

   ### Apache Iceberg version
   
   1.2.1 (latest release)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   It has been discovered that when performing in incremental read in Iceberg 1.2.1, if you call count on the incremental read DataFrame right after calling `load/table` it will return the count as though its not an incremental read DataFrame. This issue disappears if the DataFrame you call count on has any post-load operations such as `orderBy` on it. In addition, if you collect the contents of the unmodified DataFrame to a list or call `show` on the DataFrame the size of the contents is correct, making this a well hidden bug.
   
   We found this bug when one of our use case's unit tests failed while attempting to upgrade from Iceberg 1.1.0 to Iceberg 1.2.1, meaning this is a regression between those versions. We were able to replicate this in Iceberg's own unit tests, where we found it impacts Spark 3.3/3.4 but not Spark 3.1/3.2. Considering this only appears after upgrading to a newer Iceberg version, it seems more likely the issue is in Iceberg than Spark, and in addition that the reason Spark 3.1/3.2 are not impacted is it was likely an improvement that was not backported that caused the bug, but I have not tracked down what specific change causes the issue yet.
   
   I have provided Draft PR #7616 which contains the minimal change to the unit tests that replicates the issue and will attempt to narrow down the commit that causes the issue in the coming days as time permits.


-- 
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] huaxingao commented on issue #7623: Spark shows incorrect count for incremental read in some cases.

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

   Here is the [PR](https://github.com/apache/iceberg/pull/7626) to disable agg push down for incremental scan.


-- 
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] RussellSpitzer commented on issue #7623: Spark shows incorrect count for incremental read in some cases.

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

   I wonder if this is an incorrect aggregate pushdown, @huaxingao may be able to spot this more quickly than me


-- 
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] huaxingao commented on issue #7623: Spark shows incorrect count for incremental read in some cases.

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

   Thanks for checking this @singhpk234. 
   
   We should disable Agg push down for incremental scan for now. Sorry I overlooked this. 
   
   I will have a PR soon.
   
   
   


-- 
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] singhpk234 commented on issue #7623: Spark shows incorrect count for incremental read in some cases.

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

   can confirm disabling `aggregate-push-down-enabled` makes this test pass interesting thing is was agg push down suppose to work with incremental scan as we are not building incremental scan, rather than just a simple scan, 
   
   https://github.com/apache/iceberg/blob/9907a97351138e676d08e02ea53b746f4e331ec6/spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/source/SparkScanBuilder.java#L224-L230
   
   As per my understanding, The readSnapshot function just checks if there is a snapshot passed or use the latest snapshot, should we disable the Agg push down for now when we detect it's an incremental scan for now for 1.3.0 and add support for incremental scan as follow-up. 
   
   Thoughts @RussellSpitzer @huaxingao ? 


-- 
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] aokolnychyi closed issue #7623: Spark shows incorrect count for incremental read in some cases.

Posted by "aokolnychyi (via GitHub)" <gi...@apache.org>.
aokolnychyi closed issue #7623: Spark shows incorrect count for incremental read in some cases.
URL: https://github.com/apache/iceberg/issues/7623


-- 
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] RussellSpitzer commented on issue #7623: Spark shows incorrect count for incremental read in some cases.

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

   @singhpk234 I thank disabling it is probably a good first step, unless someone has time to fix it in the next few days. I have I think an hour or two to look into it today maybe ...
   


-- 
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] aokolnychyi commented on issue #7623: Spark shows incorrect count for incremental read in some cases.

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

   Resolved by #7626.


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