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

[GitHub] [spark] wangyum opened a new pull request, #40791: [SPARK-43140][SQL][TESTS] Override computeStats in `DummyLeafNode`

wangyum opened a new pull request, #40791:
URL: https://github.com/apache/spark/pull/40791

   ### What changes were proposed in this pull request?
   
   This PR makes `DummyLeafNode` override computeStats.
   
   ### Why are the changes needed?
   
   To avoid `UnsupportedOperationException` if we add a rule(for example: the following `TestRule`) use statistics even the rule after the [Early Filter and Projection Push-Down](https://github.com/apache/spark/blob/0e9e34c1bd9bd16ad5efca77ce2763eb950f3103/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala#L194-L197).
   ```scala
   object TestRule extends Rule[LogicalPlan] {
     def apply(plan: LogicalPlan): LogicalPlan = plan.transform {
       case f: Filter if f.stats.rowCount.nonEmpty =>
         f
     }
   }
   ```
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Manual test.
   


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #40791: [SPARK-43140][SQL][TESTS] Override computeStats in `DummyLeafNode`

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #40791:
URL: https://github.com/apache/spark/pull/40791#issuecomment-1510633617

   Merged to master.


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] wangyum commented on pull request #40791: [SPARK-43140][SQL][TESTS] Override computeStats in `DummyLeafNode`

Posted by "wangyum (via GitHub)" <gi...@apache.org>.
wangyum commented on PR #40791:
URL: https://github.com/apache/spark/pull/40791#issuecomment-1510593669

   cc @HyukjinKwon 


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon closed pull request #40791: [SPARK-43140][SQL][TESTS] Override computeStats in `DummyLeafNode`

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #40791: [SPARK-43140][SQL][TESTS] Override computeStats in `DummyLeafNode`
URL: https://github.com/apache/spark/pull/40791


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org