Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Oct 24, 2022

What changes were proposed in this pull request?

In the PR, I propose to quote function names by toSQLId() that are passed to DataTypeMismatch as message parameters.

Why are the changes needed?

To be consistent w/ other error messages.

Does this PR introduce any user-facing change?

Yes, it changes user-facing error message.

How was this patch tested?

By running the modified test suites:

$ PYSPARK_PYTHON=python3 build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite"

@github-actions github-actions bot added the SQL label Oct 24, 2022
@MaxGekk MaxGekk changed the title [WIP][SQL] Quote function names in datatype mismatch errors [WIP][SPARK-40898][SQL] Quote function names in datatype mismatch errors Oct 24, 2022
@MaxGekk MaxGekk requested a review from cloud-fan October 24, 2022 08:51
@MaxGekk MaxGekk changed the title [WIP][SPARK-40898][SQL] Quote function names in datatype mismatch errors [SPARK-40898][SQL] Quote function names in datatype mismatch errors Oct 24, 2022
@MaxGekk MaxGekk marked this pull request as ready for review October 24, 2022 08:51
@MaxGekk
Copy link
Member Author

MaxGekk commented Oct 24, 2022

@LuciferYang @panbingkun Could you review this PR, please.

@LuciferYang
Copy link
Contributor

The code change is fine to me, but it seems that some related tests need to be fixed

"messageParameters" : {
"dataType" : "(\"INTERVAL MONTH\" or \"INTERVAL DAY\")",
"functionName" : "function array",
"functionName" : "`function array`",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems wrong...

Copy link
Contributor

@LuciferYang LuciferYang Oct 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be "function array"?

@MaxGekk
Copy link
Member Author

MaxGekk commented Oct 25, 2022

Merging to master. Thank you, @cloud-fan and @LuciferYang for review.

@MaxGekk MaxGekk closed this in a27b459 Oct 25, 2022
SandishKumarHN pushed a commit to SandishKumarHN/spark that referenced this pull request Dec 12, 2022
### What changes were proposed in this pull request?
In the PR, I propose to quote function names by `toSQLId()` that are passed to DataTypeMismatch as message parameters.

### Why are the changes needed?
To be consistent w/ other error messages.

### Does this PR introduce _any_ user-facing change?
Yes, it changes user-facing error message.

### How was this patch tested?
By running the modified test suites:
```
$ PYSPARK_PYTHON=python3 build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite"
```

Closes apache#38370 from MaxGekk/quote-ids-datatype-mismatch.

Authored-by: Max Gekk <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
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.

3 participants