[ 
https://issues.apache.org/jira/browse/SPARK-45755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuming Wang updated SPARK-45755:
--------------------------------
    Description: 
Push down LocalLimit can not optimize the case of distinct.

{code:scala}
  def isEmpty: Boolean = withAction("isEmpty",
    withTypedPlan { LocalLimit(Literal(1), select().logicalPlan) 
}.queryExecution) { plan =>
    plan.executeTake(1).isEmpty
  }
{code}


> Push down limit through Dataset.isEmpty()
> -----------------------------------------
>
>                 Key: SPARK-45755
>                 URL: https://issues.apache.org/jira/browse/SPARK-45755
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 4.0.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> Push down LocalLimit can not optimize the case of distinct.
> {code:scala}
>   def isEmpty: Boolean = withAction("isEmpty",
>     withTypedPlan { LocalLimit(Literal(1), select().logicalPlan) 
> }.queryExecution) { plan =>
>     plan.executeTake(1).isEmpty
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to