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
Always resolve current field name in SparkSQL when creating Row objects inside of arrays #2158
Merged
jbaiera
merged 6 commits into
elastic:main
from
jbaiera:fix-spark-nested-object-empty-object-bug
Nov 16, 2023
Merged
Always resolve current field name in SparkSQL when creating Row objects inside of arrays #2158
jbaiera
merged 6 commits into
elastic:main
from
jbaiera:fix-spark-nested-object-empty-object-bug
Nov 16, 2023
Conversation
This file contains 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
masseyke
reviewed
Nov 10, 2023
spark/sql-30/src/main/scala/org/elasticsearch/spark/sql/ScalaEsRowValueReader.scala
Outdated
Show resolved
Hide resolved
masseyke
approved these changes
Nov 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had one question, but it looks good to me!
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
jbaiera
added a commit
to jbaiera/elasticsearch-hadoop
that referenced
this pull request
Nov 16, 2023
…ts inside of arrays (elastic#2158) * Resolve current field every time when creating Row objects in arrays. * Expand tests to ensure no breakages * Mirror changes to the sql-20 source root * Throw an exception for the case where there is no current field when creating a map for an array. (cherry picked from commit 668fcc1)
jbaiera
added a commit
to jbaiera/elasticsearch-hadoop
that referenced
this pull request
Nov 16, 2023
…ts inside of arrays (elastic#2158) * Resolve current field every time when creating Row objects in arrays. * Expand tests to ensure no breakages * Mirror changes to the sql-20 source root * Throw an exception for the case where there is no current field when creating a map for an array. (cherry picked from commit 668fcc1)
breskeby
pushed a commit
to breskeby/elasticsearch-hadoop
that referenced
this pull request
Dec 1, 2023
…ts inside of arrays (elastic#2158) (elastic#2166) * Resolve current field every time when creating Row objects in arrays. * Expand tests to ensure no breakages * Mirror changes to the sql-20 source root * Throw an exception for the case where there is no current field when creating a map for an array. (cherry picked from commit 668fcc1)
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.
This PR is meant to fix #2157
The solution employed is to always resolve the current field name in the value reader when creating Row objects inside of arrays.
Tests were expanded to ensure that no other code was relying on this erroneous behavior. All instances of this happening in the test environment have been cleaned up, further validation put in place, and have had the incorrect behavior confirmed.