[SPARK-47345][SQL][TESTS] Xml functions suite#45466
Closed
yhosny wants to merge 4 commits intoapache:masterfrom
Closed
[SPARK-47345][SQL][TESTS] Xml functions suite#45466yhosny wants to merge 4 commits intoapache:masterfrom
yhosny wants to merge 4 commits intoapache:masterfrom
Conversation
Contributor
|
add |
MaxGekk
reviewed
Mar 15, 2024
Member
MaxGekk
left a comment
There was a problem hiding this comment.
It seems the test failure Run / Build modules: pyspark-connect is not related to the new test suite.
MaxGekk
approved these changes
Mar 15, 2024
Member
MaxGekk
left a comment
There was a problem hiding this comment.
LGTM except of minor comments.
| test("infers schemas using options") { | ||
| val df = spark.range(1) | ||
| .select(schema_of_xml(lit("<ROW><a>1</a></ROW>"), | ||
| Map("allowUnquotedFieldNames" -> "true").asJava)) |
| class XmlFunctionsSuite extends QueryTest with SharedSparkSession { | ||
| import testImplicits._ | ||
|
|
||
|
|
Member
|
I have checked the new test suite locally: +1, LGTM. Merging to master. |
sandip-db
reviewed
Mar 19, 2024
| ) | ||
| } | ||
|
|
||
| test("schema_of_xml - infers the schema of foldable JSON string") { |
dongjoon-hyun
pushed a commit
that referenced
this pull request
Mar 19, 2024
…ctionsSuite ### What changes were proposed in this pull request? This PR is a followup of #45466 that addresses #45466 (comment). It renames a test name from JSON to XML within `XmlFunctionsSuite` ### Why are the changes needed? To have the correct test title so we don't get confused why/which test failed. ### Does this PR introduce _any_ user-facing change? No, test-only. ### How was this patch tested? CI in this PR should validate the change. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #45577 from HyukjinKwon/SPARK-47345-followup. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Convert JsonFunctiosnSuite.scala to XML equivalent. Note that XML doesn’t implement all json functions like json_tuple, get_json_object, etc.
Why are the changes needed?
Improve unit test coverage.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Unit tests.
Was this patch authored or co-authored using generative AI tooling?
No.