-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-15171][SQL]Deprecate registerTempTable and add dataset.createTempView #12945
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
Conversation
|
Test build #57947 has finished for PR 12945 at commit
|
|
Test build #57949 has finished for PR 12945 at commit
|
|
Test build #57950 has finished for PR 12945 at commit
|
|
Test build #57953 has finished for PR 12945 at commit
|
|
Test build #57956 has finished for PR 12945 at commit
|
|
Test build #57964 has finished for PR 12945 at commit
|
|
There are two places I am not very sure:
|
|
Test build #57986 has finished for PR 12945 at commit
|
|
For question 1, I think we should also deprecate corresponding API in PySpark and SparkR. For question 2, I don't get it... |
|
I think we should also deprecate |
|
If possible, can you have a pr to just add the new API and deprecate the old API? |
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.
SQLContext -> SparkSession
d53ca63 to
59654e6
Compare
|
Test build #58217 has finished for PR 12945 at commit
|
|
Test build #58219 has finished for PR 12945 at commit
|
|
Test build #58213 has finished for PR 12945 at commit
|
|
Test build #58214 has finished for PR 12945 at commit
|
|
Test build #58223 has finished for PR 12945 at commit
|
|
Test build #58226 has finished for PR 12945 at commit
|
python/pyspark/sql/session.py
Outdated
|
|
||
| return DataFrame(jdf, self._wrapped) | ||
|
|
||
| def _createTempView(self, viewName, dataFrame, replaceIfExists): |
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.
Why do we add this method?
|
The PR description is inconsistent with changes made in the PR now. Please update. |
|
Test build #58449 has finished for PR 12945 at commit
|
| noException should be thrownBy { | ||
| // Overrrides the existing temporary view with same name | ||
| dataset.createOrReplaceTempView("tempView") | ||
| } |
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.
In general, we try to avoid using fancy ScalaTest assertion facilities like this one. In this case, a simple call to createOrReplaceTempView and a comment saying that no exception should be thrown is enough.
| * @group basic | ||
| * @since 1.6.0 | ||
| */ | ||
| @deprecated("Use createOrReplaceTempView(tableName) instead.", "2.0.0") |
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.
Nit: tableName => viewName
|
LGTM except for one minor comment for the deprecation warning message. |
|
OK, I'm merging this to master and branch-2.0 since the last commit only changes deprecation message. |
…TempView ## What changes were proposed in this pull request? Deprecates registerTempTable and add dataset.createTempView, dataset.createOrReplaceTempView. ## How was this patch tested? Unit tests. Author: Sean Zhong <[email protected]> Closes #12945 from clockfly/spark-15171. (cherry picked from commit 33c6eb5) Signed-off-by: Cheng Lian <[email protected]>
|
Test build #58456 has finished for PR 12945 at commit
|
|
Test build #58459 has finished for PR 12945 at commit
|
|
Test build #58457 has finished for PR 12945 at commit
|
….registerTempTable ## What changes were proposed in this pull request? Update the unit test code, examples, and documents to remove calls to deprecated method `dataset.registerTempTable`. ## How was this patch tested? This PR only changes the unit test code, examples, and comments. It should be safe. This is a follow up of PR #12945 which was merged. Author: Sean Zhong <[email protected]> Closes #13098 from clockfly/spark-15171-remove-deprecation.
….registerTempTable ## What changes were proposed in this pull request? Update the unit test code, examples, and documents to remove calls to deprecated method `dataset.registerTempTable`. ## How was this patch tested? This PR only changes the unit test code, examples, and comments. It should be safe. This is a follow up of PR #12945 which was merged. Author: Sean Zhong <[email protected]> Closes #13098 from clockfly/spark-15171-remove-deprecation. (cherry picked from commit 25b315e) Signed-off-by: Cheng Lian <[email protected]>
…placeTempView ## What changes were proposed in this pull request? This PR replaces `registerTempTable` with `createOrReplaceTempView` as a follow-up task of #12945. ## How was this patch tested? Existing SparkR tests. Author: Cheng Lian <[email protected]> Closes #13644 from liancheng/spark-15925-temp-view-for-r.
…placeTempView ## What changes were proposed in this pull request? This PR replaces `registerTempTable` with `createOrReplaceTempView` as a follow-up task of #12945. ## How was this patch tested? Existing SparkR tests. Author: Cheng Lian <[email protected]> Closes #13644 from liancheng/spark-15925-temp-view-for-r. (cherry picked from commit ced8d66) Signed-off-by: Shivaram Venkataraman <[email protected]>
## What changes were proposed in this pull request? after #12945, we renamed the `registerTempTable` to `createTempView`, as we do create a view actually. This PR renames `SQLTestUtils.withTempTable` to reflect this change. ## How was this patch tested? N/A Author: Wenchen Fan <[email protected]> Closes #14318 from cloud-fan/minor4.
after #12945, we renamed the `registerTempTable` to `createTempView`, as we do create a view actually. This PR renames `SQLTestUtils.withTempTable` to reflect this change. N/A Author: Wenchen Fan <[email protected]> Closes #14318 from cloud-fan/minor4. (cherry picked from commit 86c2752) Signed-off-by: Reynold Xin <[email protected]>
What changes were proposed in this pull request?
Deprecates registerTempTable and add dataset.createTempView, dataset.createOrReplaceTempView.
How was this patch tested?
Unit tests.