-
Notifications
You must be signed in to change notification settings - Fork 72
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
docs(spark): add substrait-spark usage examples #293
Conversation
3d8df4e
to
d7ea257
Compare
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.
Was able to make some time to look at part of this. Left some questions.
examples/substrait-spark/app/src/main/java/io/substrait/examples/SparkDataset.java
Outdated
Show resolved
Hide resolved
@mbwhite I'm also open to having this be its own build if that makes more sense. I just noticed it wasn't integrated into the main build and was curious how difficult it would be to do so. There are some advantages to keeping it separate. |
8e26144
to
47c4a53
Compare
@vbarua I think it's a bit simpler now which is good, and the editor does pick it up properly. But still should be clear enough to for anybody to use to make their own application. Also moved to Kotlin; hopefully got it right! (though admit gradle did put up more resistence than I expected :-) ) |
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've gone ahead and configured and run spotless, and also applies some minor doc changes. Let me know if those seem reasonable to you. I've also left some questions inline.
There's parts of the README that seem to reference functionality that's not in this PR. Did these examples come from some other repo?
examples/substrait-spark/src/main/java/io/substrait/examples/SparkHelper.java
Outdated
Show resolved
Hide resolved
examples/substrait-spark/src/main/java/io/substrait/examples/SparkHelper.java
Outdated
Show resolved
Hide resolved
examples/substrait-spark/src/main/java/io/substrait/examples/SparkHelper.java
Outdated
Show resolved
Hide resolved
c1c7d5f
to
9e768ca
Compare
9e768ca
to
3f01a2a
Compare
Rebased of off |
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.
|
||
/** ExpressionStringify gives a simple debug text output for Expressions */ | ||
public class ExpressionStringify extends ParentStringify | ||
implements ExpressionVisitor<String, RuntimeException> { |
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.
meta: this doesn't seem to fully implement a visitation for all expressions. Doing so it out of scope for this, but I've added a comment indicating that this is still a work in progress and linked it to #302
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.
Sounds good to me :-)
examples/substrait-spark/src/main/java/io/substrait/examples/util/SubstraitStringify.java
Show resolved
Hide resolved
Signed-off-by: MBWhite <[email protected]>
Address the review comments Also adjusted the build so it was connected to the main top level build (resulted in removing quite a bit of the gradle build that really wasn't needed here) Converted to Kotlin format (hopefully corectly) Signed-off-by: MBWhite <[email protected]>
Signed-off-by: MBWhite <[email protected]>
1f59203
to
fe8096b
Compare
Signed-off-by: MBWhite <[email protected]>
fe8096b
to
6f81cc5
Compare
This adds a new Substrait-Spark example to the repo
Note I've not added running up the Spark engine to test - as I don't to blow any of the github actions time or capacity.