Skip to content

don't link to deprecated function#22370

Closed
MichaelChirico wants to merge 1 commit intoapache:masterfrom
MichaelChirico:patch-1
Closed

don't link to deprecated function#22370
MichaelChirico wants to merge 1 commit intoapache:masterfrom
MichaelChirico:patch-1

Conversation

@MichaelChirico
Copy link
Copy Markdown
Contributor

Seems misleading to (without qualification) link to a deprecated function

What changes were proposed in this pull request?

(Please fill in changes proposed in this fix)

How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

Please review http://spark.apache.org/contributing.html before opening a pull request.

Seems misleading to (without qualification) link to a deprecated function
@AmplabJenkins
Copy link
Copy Markdown

Can one of the admins verify this patch?

Copy link
Copy Markdown
Member

@felixcheung felixcheung left a comment

Choose a reason for hiding this comment

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

thanks for the your input. I'm not sure if this is a big problem - I think it's helpful to link from the deprecated method to the replacement, and back?

Comment thread R/pkg/R/catalog.R
#' @param ... additional named parameters as options for the data source.
#' @return A SparkDataFrame.
#' @rdname createTable
#' @seealso \link{createExternalTable}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One thing we should check for such things is, if it happens globally in the documentation or not BTW.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agree...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't see it here (nothing pointing to sparkR.init/sparkRHive.init/sparkRSQL.init):

https://spark.apache.org/docs/latest/api/R/sparkR.session.html

or here (nothing pointing to dropTempTable):

https://spark.apache.org/docs/latest/api/R/dropTempView.html

But I do see it here (points to registerTempTable):

https://spark.apache.org/docs/latest/api/R/createOrReplaceTempView.html

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Shall I amend the PR to fix the registerTempTable page as well?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we should fix, yea, better fix them all. @felixcheung has a better insight in R side. You batter wait for his opinion.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

registerTempTable is because of the @family tag, so it's a bit different.

@MichaelChirico
Copy link
Copy Markdown
Contributor Author

@felixcheung I disagree... what's the point of deprecation if it's going to keep being considered as a co-equal function in the eyes of documentation?

If the function is being deprecated, it should be "soft-blacklisted" -- documentation still available (but clearly marked) for users of "legacy" code where its usage still survives, but I don't see any argument for even letting new users find out a deprecated function exists.

@felixcheung
Copy link
Copy Markdown
Member

felixcheung commented Sep 10, 2018 via email

Copy link
Copy Markdown
Member

@felixcheung felixcheung left a comment

Choose a reason for hiding this comment

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

hey thanks for the contribution, I'm good if you could remove the @family in registerTempTable and check the doc generated by doc build?

Comment thread R/pkg/R/catalog.R
#' @param ... additional named parameters as options for the data source.
#' @return A SparkDataFrame.
#' @rdname createTable
#' @seealso \link{createExternalTable}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

registerTempTable is because of the @family tag, so it's a bit different.

@MichaelChirico
Copy link
Copy Markdown
Contributor Author

@felixcheung thanks for the feedback, yes, I axed registerTempTable from the SparkDataFrame @family`.

Sorry I botched an attempt to try and rename the branch of this PR (apparently not possible to overwrite this PR with a new branch name); PR re-filed as #22393

asfgit pushed a commit that referenced this pull request Sep 16, 2018
Continuation of #22370. Summary of discussion there:

There is some inconsistency in the R manual w.r.t. supercedent functions linking back to deprecated functions.

 - `createOrReplaceTempView` and `createTable` both link back to functions which are deprecated (`registerTempTable` and `createExternalTable`, respectively)
 - `sparkR.session` and `dropTempView` do _not_ link back to deprecated functions

This PR takes the view that it is preferable _not_ to link back to deprecated functions, and removes these references from `?createOrReplaceTempView` and `?createTable`.

As `registerTempTable` was included in the `SparkDataFrame functions` `family` of functions, other documentation pages which included a link to `?registerTempTable` will similarly be altered.

Author: Michael Chirico <michael.chirico@grabtaxi.com>
Author: Michael Chirico <michaelchirico4@gmail.com>

Closes #22393 from MichaelChirico/axe_deprecated_doc_refs.

(cherry picked from commit a1dd782)
Signed-off-by: Felix Cheung <felixcheung@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants