Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(spark): convert VirtualTableScan to LocalRelation #312

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

Blizzara
Copy link
Contributor

The other direction (Spark -> Substrait) was already supported, but this adds Substrait -> Spark and enables round-trip testing.

Also fixes LocalRelation -> VirtualTableScan for rows containing null values.

@Blizzara Blizzara changed the title feat: support converting VirtualTableScans into LocalRelations feat(spark): support converting VirtualTableScans into LocalRelations Oct 24, 2024
@Blizzara Blizzara force-pushed the avo/fix-spark-virtual-relations branch from fe66521 to 65aa978 Compare October 24, 2024 18:49
@@ -128,7 +128,7 @@ class ToSubstraitType {
)
}

def toAttribute(namedStruct: NamedStruct): Seq[AttributeReference] = {
def toAttributeSeq(namedStruct: NamedStruct): Seq[AttributeReference] = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same rename as in #311

also fix LocalRelation -> VirtualTableScan for rows containing null values
@Blizzara Blizzara force-pushed the avo/fix-spark-virtual-relations branch from 65aa978 to f384d92 Compare October 24, 2024 19:32
Copy link
Member

@vbarua vbarua left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for adding this!

@vbarua vbarua changed the title feat(spark): support converting VirtualTableScans into LocalRelations feat(spark): convert VirtualTableScan to LocalRelation Oct 24, 2024
@vbarua vbarua merged commit 3f2cc1e into substrait-io:main Oct 24, 2024
13 checks passed
@Blizzara Blizzara deleted the avo/fix-spark-virtual-relations branch October 25, 2024 19:41
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants