Skip to content

Conversation

@LuciferYang
Copy link
Contributor

What changes were proposed in this pull request?

QueryExecution.debug#toFile method supports passing in maxFields and this parameter will be passed down when explainMode is SimpleMode, ExtendedMode, or CostMode.

But the passed down maxFields was ignored when explainMode is CostMode because QueryExecution#stringWithStats overrides it with SQLConf.get.maxToStringFields at present, so this pr removes the override behavior to let passed in maxFields take effect.

Why are the changes needed?

Bug fix

Does this PR introduce any user-facing change?

No

How was this patch tested?

Pass GA and add a new test case

…n `maxFields` when `explainMode` is `CodegenMode`

### What changes were proposed in this pull request?
`QueryExecution.debug#toFile` method supports passing in `maxFields` and this parameter will be passed down when `explainMode` is `SimpleMode`, `ExtendedMode`, or `CostMode`.

But the passed down `maxFields` was ignored when `explainMode` is `CostMode` because `QueryExecution#stringWithStats` overrides it with `SQLConf.get.maxToStringFields` at present,  so this pr removes the override behavior to let passed in `maxFields` take effect.

### Why are the changes needed?
Bug fix

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GA and add a new test case

Closes apache#35506 from LuciferYang/SPARK-38198.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
@LuciferYang
Copy link
Contributor Author

cc @MaxGekk

@github-actions github-actions bot added the SQL label Feb 14, 2022
MaxGekk pushed a commit that referenced this pull request Feb 14, 2022
…d in maxFields when explainMode is CodegenMode

### What changes were proposed in this pull request?
`QueryExecution.debug#toFile` method supports passing in `maxFields` and this parameter will be passed down when `explainMode` is `SimpleMode`, `ExtendedMode`, or `CostMode`.

But the passed down `maxFields` was ignored when `explainMode` is `CostMode` because `QueryExecution#stringWithStats` overrides it with `SQLConf.get.maxToStringFields` at present,  so this pr removes the override behavior to let passed in `maxFields` take effect.

### Why are the changes needed?
Bug fix

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GA and add a new test case

Closes #35515 from LuciferYang/SPARK-38198-32.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
@MaxGekk
Copy link
Member

MaxGekk commented Feb 14, 2022

Merging to branch-3.2. Thank you, @LuciferYang .

@MaxGekk MaxGekk closed this Feb 14, 2022
@LuciferYang
Copy link
Contributor Author

thanks @MaxGekk

kazuyukitanimura pushed a commit to kazuyukitanimura/spark that referenced this pull request Aug 10, 2022
…d in maxFields when explainMode is CodegenMode

### What changes were proposed in this pull request?
`QueryExecution.debug#toFile` method supports passing in `maxFields` and this parameter will be passed down when `explainMode` is `SimpleMode`, `ExtendedMode`, or `CostMode`.

But the passed down `maxFields` was ignored when `explainMode` is `CostMode` because `QueryExecution#stringWithStats` overrides it with `SQLConf.get.maxToStringFields` at present,  so this pr removes the override behavior to let passed in `maxFields` take effect.

### Why are the changes needed?
Bug fix

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GA and add a new test case

Closes apache#35515 from LuciferYang/SPARK-38198-32.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
@LuciferYang LuciferYang deleted the SPARK-38198-32 branch October 22, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants