Uh oh!
There was an error while loading. Please reload this page.
[SPARK-29348][SQL][FOLLOWUP] Fix slight bug on streaming example for Dataset.observe - #27046
[SPARK-29348][SQL][FOLLOWUP] Fix slight bug on streaming example for Dataset.observe#27046HeartSaVioR wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
This was a minor bug on example: unlike observedMetrics available in QueryExecutionListener, event.progress.observedMetrics is a "Java" Map instead of "Scala" Map, hence to use foreach it needs asScala to convert to Scala Map.
There was a problem hiding this comment.
Sounds fine. The alternative is to wrap it in Option(....get(...)).foreach but that's messier
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
HeartSaVioR
commented
Dec 30, 2019
Thanks for reviewing, reflected review comments, as well as updated PR description to reflect the change. |
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Dec 30, 2019
Test build #115935 has finished for PR 27046 at commit
|
SparkQA
commented
Dec 30, 2019
Test build #115931 has finished for PR 27046 at commit
|
SparkQA
commented
Dec 30, 2019
Test build #115936 has finished for PR 27046 at commit
|
HyukjinKwon
commented
Dec 30, 2019
retest this please |
There was a problem hiding this comment.
FYI @hvanhovell as I believe you're already using this API; this changes the method signature.
hvanhovell
commented
Dec 30, 2019
See my comments on this in #26127. I am -1 on this in its current form. I am fine with fixing the example. |
HeartSaVioR
commented
Dec 30, 2019
For the record, the link of key comment is here: #26127 (comment) |
4c16552 to
2878cdbCompareHeartSaVioR
commented
Dec 30, 2019
Just updated. Please take a look again. Thanks in advance! |
SparkQA
commented
Dec 30, 2019
Test build #115940 has finished for PR 27046 at commit
|
HyukjinKwon
commented
Dec 30, 2019
Discussed with @hvanhovell offline as well. Yup, I am good with it. |
SparkQA
commented
Dec 30, 2019
Test build #115954 has finished for PR 27046 at commit
|
HyukjinKwon
commented
Dec 30, 2019
Merged to master. |
HeartSaVioR
commented
Dec 30, 2019
Thanks for reviewing and merging! |
What changes were proposed in this pull request?
This patch fixes a small bug in the example of streaming query, as the type of observable metrics is Java Map instead of Scala Map, so to use foreach it should be converted first.
Why are the changes needed?
Described above.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Ran below query via
spark-shell:Streaming