Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/16138#discussion_r97493826
--- Diff: R/pkg/inst/tests/testthat/test_sparkSQL.R ---
@@ -1177,6 +1177,9 @@ test_that("column functions", {
c17 <- cov(c, c1) + cov("c", "c1") + covar_samp(c, c1) + covar_samp("c",
"c1")
c18 <- covar_pop(c, c1) + covar_pop("c", "c1")
c19 <- spark_partition_id()
+ c20 <- to_timestamp(c) + trim(c) + unbase64(c) + unhex(c) + upper(c)
+ c21 <- to_timestamp(c, "yyyy") + trim(c) + unbase64(c) + unhex(c) +
upper(c)
+ c22 <- to_date(c, "yyyy") + trim(c) + unbase64(c) + unhex(c) + upper(c)
--- End diff --
you probably don't need to duplicate `+ trim(c) + unbase64(c) + unhex(c) +
upper(c)` - as explained on the other comment, the goal (from what I can see)
is to call each of these once.
So you could condense these 3 lines into
```
c20 <- to_timestamp(c) + to_timestamp(c, "yyyy") + to_date(c, "yyyy")
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]