Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] behavior of spark.rapids.sql.enabled #7

Closed
revans2 opened this issue May 28, 2020 · 1 comment · Fixed by #378
Closed

[DOC] behavior of spark.rapids.sql.enabled #7

revans2 opened this issue May 28, 2020 · 1 comment · Fixed by #378
Labels
documentation Improvements or additions to documentation

Comments

@revans2
Copy link
Collaborator

revans2 commented May 28, 2020

Report needed documentation

Report needed documentation
If I created a dataframe (without executing) I can't change that the plugin is enabled or disabled after the fact (with the same df reference). I can only get the change to take effect after recreating df.

It would be good to document why this is happening, so the user can plan for it.

With the plugin enabled:

scala> df.explain
19/09/24 16:18:37 WARN GpuOverrides: *Exec <HashAggregateExec> could run on GPU
*Expression <AggregateExpression> sum(sum_quantity#32) could run on GPU *Expression <Sum> sum(sum_quantity#32) could run on GPU
....
== Physical Plan ==
*(1) GpuColumnarToRow
...

With the plugin disabled, df still shows a GPU plan:

scala> spark.conf.set("spark.rapids.sql.enabled", false)
scala> df.explain
== Physical Plan ==
*(1) GpuColumnarToRow
...

If I recreate it, we are back to the CPU:

scala> val df = spark.sql(q)
df: org.apache.spark.sql.DataFrame = [l_linenumber: bigint, sum(sum_quantity): double ... 2 more fields]
scala> df.explain
== Physical Plan ==
*(3) HashAggregate(keys=[l_linenumber#3L], functions=[sum(sum_quantity#76), min(min_quantity#77), max(max_quantity#78)])
...
@revans2 revans2 added the ? - Needs Triage Need team to review and classify label May 28, 2020
@sameerz sameerz added this to the Release 0.2 milestone Jun 12, 2020
@sameerz sameerz removed this from the Jun 22 - Jul 2 milestone Jun 12, 2020
@revans2
Copy link
Collaborator Author

revans2 commented Jul 14, 2020

The reason for this is that executedPlan in DataSet is a lazy val. The explain is the only thing that is impacted by this. Actual execution happens as expected.

@sameerz sameerz removed the ? - Needs Triage Need team to review and classify label Jul 17, 2020
@sameerz sameerz added this to the Jul 6 - Jul 17 milestone Jul 17, 2020
gerashegalov pushed a commit to gerashegalov/spark-rapids that referenced this issue Nov 18, 2022
@sameerz sameerz added the documentation Improvements or additions to documentation label Jul 31, 2023
tgravescs pushed a commit to tgravescs/spark-rapids that referenced this issue Nov 30, 2023
Signed-off-by: spark-rapids automation <[email protected]>
nvliyuan referenced this issue in nvliyuan/yuali-spark-rapids May 6, 2024
* A hacky approach for regexpr rewrite

Signed-off-by: Haoyang Li <[email protected]>

* Use contains instead for that case

Signed-off-by: Haoyang Li <[email protected]>

* add config to switch

Signed-off-by: Haoyang Li <[email protected]>

* Rewrite some rlike expression to StartsWith/EndsWith/Contains

Signed-off-by: Haoyang Li <[email protected]>

* clean up

Signed-off-by: Haoyang Li <[email protected]>

* wip

Signed-off-by: Haoyang Li <[email protected]>

* wip

Signed-off-by: Haoyang Li <[email protected]>

* add tests and config

Signed-off-by: Haoyang Li <[email protected]>

* support range filter

Signed-off-by: Haoyang Li <[email protected]>

---------

Signed-off-by: Haoyang Li <[email protected]>
sperlingxx pushed a commit to sperlingxx/spark-rapids that referenced this issue May 9, 2024
* A hacky approach for regexpr rewrite

Signed-off-by: Haoyang Li <[email protected]>

* Use contains instead for that case

Signed-off-by: Haoyang Li <[email protected]>

* add config to switch

Signed-off-by: Haoyang Li <[email protected]>

* Rewrite some rlike expression to StartsWith/EndsWith/Contains

Signed-off-by: Haoyang Li <[email protected]>

* clean up

Signed-off-by: Haoyang Li <[email protected]>

* wip

Signed-off-by: Haoyang Li <[email protected]>

* wip

Signed-off-by: Haoyang Li <[email protected]>

* add tests and config

Signed-off-by: Haoyang Li <[email protected]>

* support range filter

Signed-off-by: Haoyang Li <[email protected]>

---------

Signed-off-by: Haoyang Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants