Skip to content

Conversation

@actuaryzhang
Copy link
Contributor

What changes were proposed in this pull request?

Grouped documentation for column collection methods.

@actuaryzhang
Copy link
Contributor Author

Last part of this doc update.

@actuaryzhang actuaryzhang changed the title [SPARK-20889][SparkR] Grouped documentation for COLLECTOIN column methods [SPARK-20889][SparkR] Grouped documentation for COLLECTION column methods Jun 28, 2017
@actuaryzhang
Copy link
Contributor Author

@felixcheung @HyukjinKwon

image
image
image

@SparkQA
Copy link

SparkQA commented Jun 28, 2017

Test build #78816 has finished for PR 18458 at commit ad9de63.

  • This patch fails due to an unknown error code, -10.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
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.

LGTM - a few very minor comments

#' df2 <- sql("SELECT named_struct('name', 'Bob') as people")
#' df2 <- mutate(df2, people_json = to_json(df2$people))
#' schema <- structType(structField("name", "string"))
#' head(select(df2, from_json(df2$people_json, schema)))}
Copy link
Member

Choose a reason for hiding this comment

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

I think it's worthwhile to keep dateFormat = "dd/MM/yyyy") in the example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this. Added an example.

#' @details
#' \code{from_json}: Parses a column containing a JSON string into a Column of \code{structType}
#' with the specified \code{schema} or array of \code{structType} if \code{as.json.array} is set
#' to \code{TRUE}. If the string is unparseable, the Column will contains the value NA.
Copy link
Member

Choose a reason for hiding this comment

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

btw, will contains the value NA. is very consistently documented. in this case this is right, but there are many other that says the value is null (note lower case) which isn't quite correct on the R side.

another project? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected the typo. Will consider updating null & NA in the future :)

#' head(tmp2)
#' head(select(tmp, posexplode(tmp$v1)))
#' head(select(tmp, sort_array(tmp$v1)))
#' head(select(tmp, sort_array(tmp$v1, FALSE)))}
Copy link
Member

Choose a reason for hiding this comment

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

nit, let's improve this? I think in sort_array we could be more clear, eg. sort_array(tmp$v1, asc = FALSE)

@SparkQA
Copy link

SparkQA commented Jun 29, 2017

Test build #78856 has finished for PR 18458 at commit 664629d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 29, 2017

Test build #78869 has finished for PR 18458 at commit c47b3a2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 29, 2017

Test build #78915 has finished for PR 18458 at commit 6aa4c6f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 30, 2017

Test build #78949 has finished for PR 18458 at commit 8be3e49.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@actuaryzhang
Copy link
Contributor Author

@felixcheung This is the last set of this doc update. Once it gets in, I will do another pass to fix any styles or consistency issue.

@felixcheung
Copy link
Member

merged to master. thanks!

@asfgit asfgit closed this in 5298171 Jun 30, 2017
@actuaryzhang actuaryzhang deleted the sparkRDocCollection branch June 30, 2017 06:03
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.

3 participants