You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/07/13 13:54:05 UTC
[GitHub] [spark] brandondahler opened a new pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
brandondahler opened a new pull request #33323:
URL: https://github.com/apache/spark/pull/33323
### What changes were proposed in this pull request?
Adds 3 new syntactic sugar overloads to Dataset's join method as proposed in [SPARK-35739](https://issues.apache.org/jira/browse/SPARK-35739).
### Why are the changes needed?
Improved development experience for developers using Spark SQL, specifically when coding in Java.
Prior to changes the Seq overloads required developers to use less-known Java-to-Scala converter methods that made code less readable. The overloads internalize those converter calls for two of the new methods and the third method adds a single-item overload that is useful for both Java and Scala.
### Does this PR introduce _any_ user-facing change?
Yes, the three new overloads technically constitute an API change to the Dataset class. These overloads are net-new and have been commented appropriately in line with the existing methods.
### How was this patch tested?
Test cases were not added because it is unclear to me where/how syntactic sugar overloads fit into the testing suites (if at all). Happy to add them if I can be pointed in the correct direction.
* Changes were tested in Scala via spark-shell.
* Changes were tested in Java by modifying an example:
```
diff --git a/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQLExample.java b/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQLExample.java
index 86a9045d8a..342810c1e6 100644
--- a/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQLExample.java
+++ b/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQLExample.java
@@ -124,6 +124,10 @@ public class JavaSparkSQLExample {
// |-- age: long (nullable = true)
// |-- name: string (nullable = true)
+ df.join(df, new String[] {"age"}).show();
+ df.join(df, "age", "left").show();
+ df.join(df, new String[] {"age"}, "left").show();
+
// Select only the "name" column
df.select("name").show();
// +-------+
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] github-actions[bot] commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-979526233
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #33323:
URL: https://github.com/apache/spark/pull/33323#discussion_r689013105
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -970,7 +995,59 @@ class Dataset[T] private[sql](
}
/**
- * Equi-join with another `DataFrame` using the given columns. A cross join with a predicate
+ * Equi-join with another `DataFrame` using the given column. A cross join with a predicate
+ * is specified as an inner join. If you would explicitly like to perform a cross join use the
+ * `crossJoin` method.
+ *
+ * Different from other join functions, the join column will only appear once in the output,
+ * i.e. similar to SQL's `JOIN USING` syntax.
+ *
+ * @param right Right side of the join operation.
+ * @param usingColumn Name of the column to join on. This column must exist on both sides.
+ * @param joinType Type of join to perform. Default `inner`. Must be one of:
+ * `inner`, `cross`, `outer`, `full`, `fullouter`, `full_outer`, `left`,
+ * `leftouter`, `left_outer`, `right`, `rightouter`, `right_outer`,
+ * `semi`, `leftsemi`, `left_semi`, `anti`, `leftanti`, left_anti`.
+ *
+ * @note If you perform a self-join using this function without aliasing the input
+ * `DataFrame`s, you will NOT be able to reference any columns after the join, since
+ * there is no way to disambiguate which side of the join you would like to reference.
+ *
+ * @group untypedrel
+ * @since 3.3.0
+ */
+ def join(right: Dataset[_], usingColumn: String, joinType: String): DataFrame = {
+ join(right, Seq(usingColumn), joinType)
+ }
+
+ /**
+ * (Java-specific) Equi-join with another `DataFrame` using the given columns. A cross join with
Review comment:
Yeah, I would also avoid duplicating the docs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] brandondahler commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
brandondahler commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898946497
> **[Test build #142470 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142470/testReport)** for PR 33323 at commit [`2314d1d`](https://github.com/apache/spark/commit/2314d1d41f26973a27f6576aeec2f7c6de6dff4f).
>
> * This patch **fails to build**.
>
> * This patch merges cleanly.
>
> * This patch adds no public classes.
Appears to have failed compilation with the following:
```
[warn] multiple main classes detected: run 'show discoveredMainClasses' to see the list
[error] ## Exception when compiling 493 sources to /home/jenkins/workspace/SparkPullRequestBuilder/sql/catalyst/target/scala-2.12/classes
[error] java.lang.StackOverflowError
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.tools.nsc.transform.CleanUp$CleanUpTransformer.transform(CleanUp.scala:607)
[error] scala.tools.nsc.transform.CleanUp$CleanUpTransformer.transform(CleanUp.scala:37)
[error] scala.reflect.api.Trees$Transformer.$anonfun$transformStats$1(Trees.scala:2597)
[error] scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2595)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1430)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1400)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:28)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:28)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.tools.nsc.transform.CleanUp$CleanUpTransformer.transform(CleanUp.scala:607)
...
```
Which appears to be unrelated to my change set?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879596706
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45508/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] brandondahler commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
brandondahler commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898936661
Had to push another revision due to a comment line being too long -.- sorry for the churn
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898948022
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/46977/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898935428
**[Test build #142469 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142469/testReport)** for PR 33323 at commit [`52399ea`](https://github.com/apache/spark/commit/52399ea36a51d46ad36896363ed2eb07c22d6615).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898945297
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46976/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879136851
Can one of the admins verify this patch?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898935428
**[Test build #142469 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142469/testReport)** for PR 33323 at commit [`52399ea`](https://github.com/apache/spark/commit/52399ea36a51d46ad36896363ed2eb07c22d6615).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898940889
**[Test build #142470 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142470/testReport)** for PR 33323 at commit [`2314d1d`](https://github.com/apache/spark/commit/2314d1d41f26973a27f6576aeec2f7c6de6dff4f).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898948022
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/46977/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879577688
**[Test build #140994 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140994/testReport)** for PR 33323 at commit [`7beee40`](https://github.com/apache/spark/commit/7beee40113ccf7317143c51b123bca0d65d9a0c1).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] github-actions[bot] closed pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #33323:
URL: https://github.com/apache/spark/pull/33323
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879742697
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140994/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898948009
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46977/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879608970
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/45508/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] brandondahler commented on a change in pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
brandondahler commented on a change in pull request #33323:
URL: https://github.com/apache/spark/pull/33323#discussion_r689567804
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -970,7 +995,59 @@ class Dataset[T] private[sql](
}
/**
- * Equi-join with another `DataFrame` using the given columns. A cross join with a predicate
+ * Equi-join with another `DataFrame` using the given column. A cross join with a predicate
+ * is specified as an inner join. If you would explicitly like to perform a cross join use the
+ * `crossJoin` method.
+ *
+ * Different from other join functions, the join column will only appear once in the output,
+ * i.e. similar to SQL's `JOIN USING` syntax.
+ *
+ * @param right Right side of the join operation.
+ * @param usingColumn Name of the column to join on. This column must exist on both sides.
+ * @param joinType Type of join to perform. Default `inner`. Must be one of:
+ * `inner`, `cross`, `outer`, `full`, `fullouter`, `full_outer`, `left`,
+ * `leftouter`, `left_outer`, `right`, `rightouter`, `right_outer`,
+ * `semi`, `leftsemi`, `left_semi`, `anti`, `leftanti`, left_anti`.
+ *
+ * @note If you perform a self-join using this function without aliasing the input
+ * `DataFrame`s, you will NOT be able to reference any columns after the join, since
+ * there is no way to disambiguate which side of the join you would like to reference.
+ *
+ * @group untypedrel
+ * @since 3.3.0
+ */
+ def join(right: Dataset[_], usingColumn: String, joinType: String): DataFrame = {
+ join(right, Seq(usingColumn), joinType)
+ }
+
+ /**
+ * (Java-specific) Equi-join with another `DataFrame` using the given columns. A cross join with
Review comment:
I'm not familiar with scala in general and I tried to mess with Scaladoc's `@see` link formatting, but I wasn't able to successfully get it to actually link to the other overloaded method.
I used these links for reference and did various different formats as suggested, but IntelliJ doesn't seem to accept them (presuming that the IntelliJ implementation correctly processes them):
* https://docs.scala-lang.org/overviews/scaladoc/for-library-authors.html
* https://stackoverflow.com/questions/53850885/how-to-use-see-scaladoc
* https://github.com/scala/scala/blob/2.12.x/test/scaladoc/resources/links.scala
I'm happy to make the change if anyone knows the correct syntax for referring from `Dataset#join(Dataset[_], Array[String], String): DataFrame` to `Dataset#join(Dataset[_], Seq[String], String): DataFrame)`.
---
All that being said, as a user of the library I'd prefer the docs not require an extra level of indirection in this case because there's not really that much information being expressed in these docs -- the biggest section in it is the `@param joinType` and that's only because it is listing out all the valid values.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898935616
**[Test build #142469 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142469/testReport)** for PR 33323 at commit [`52399ea`](https://github.com/apache/spark/commit/52399ea36a51d46ad36896363ed2eb07c22d6615).
* This patch **fails Scala style tests**.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898951075
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46978/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #33323:
URL: https://github.com/apache/spark/pull/33323#discussion_r690027199
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -970,7 +995,59 @@ class Dataset[T] private[sql](
}
/**
- * Equi-join with another `DataFrame` using the given columns. A cross join with a predicate
+ * Equi-join with another `DataFrame` using the given column. A cross join with a predicate
+ * is specified as an inner join. If you would explicitly like to perform a cross join use the
+ * `crossJoin` method.
+ *
+ * Different from other join functions, the join column will only appear once in the output,
+ * i.e. similar to SQL's `JOIN USING` syntax.
+ *
+ * @param right Right side of the join operation.
+ * @param usingColumn Name of the column to join on. This column must exist on both sides.
+ * @param joinType Type of join to perform. Default `inner`. Must be one of:
+ * `inner`, `cross`, `outer`, `full`, `fullouter`, `full_outer`, `left`,
+ * `leftouter`, `left_outer`, `right`, `rightouter`, `right_outer`,
+ * `semi`, `leftsemi`, `left_semi`, `anti`, `leftanti`, left_anti`.
+ *
+ * @note If you perform a self-join using this function without aliasing the input
+ * `DataFrame`s, you will NOT be able to reference any columns after the join, since
+ * there is no way to disambiguate which side of the join you would like to reference.
+ *
+ * @group untypedrel
+ * @since 3.3.0
+ */
+ def join(right: Dataset[_], usingColumn: String, joinType: String): DataFrame = {
+ join(right, Seq(usingColumn), joinType)
+ }
+
+ /**
+ * (Java-specific) Equi-join with another `DataFrame` using the given columns. A cross join with
Review comment:
Let's just go ahead with a prose then.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898941561
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/142470/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #33323:
URL: https://github.com/apache/spark/pull/33323#discussion_r669261877
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -981,6 +1006,58 @@ class Dataset[T] private[sql](
join(right, usingColumns, "inner")
}
+ /**
+ * Equi-join with another `DataFrame` using the given column. A cross join with a predicate
+ * is specified as an inner join. If you would explicitly like to perform a cross join use the
+ * `crossJoin` method.
+ *
+ * Different from other join functions, the join column will only appear once in the output,
+ * i.e. similar to SQL's `JOIN USING` syntax.
+ *
+ * @param right Right side of the join operation.
+ * @param usingColumn Name of the column to join on. This column must exist on both sides.
+ * @param joinType Type of join to perform. Default `inner`. Must be one of:
+ * `inner`, `cross`, `outer`, `full`, `fullouter`, `full_outer`, `left`,
+ * `leftouter`, `left_outer`, `right`, `rightouter`, `right_outer`,
+ * `semi`, `leftsemi`, `left_semi`, `anti`, `leftanti`, left_anti`.
+ *
+ * @note If you perform a self-join using this function without aliasing the input
+ * `DataFrame`s, you will NOT be able to reference any columns after the join, since
+ * there is no way to disambiguate which side of the join you would like to reference.
+ *
+ * @group untypedrel
+ * @since 3.1.3
+ */
+ def join(right: Dataset[_], usingColumn: String, joinType: String): DataFrame = {
+ join(right, Seq(usingColumn), joinType)
+ }
+
+ /**
+ * (Java-specific) Equi-join with another `DataFrame` using the given columns. A cross join with
+ * a predicate is specified as an inner join. If you would explicitly like to perform a cross
+ * join use the `crossJoin` method.
+ *
+ * Different from other join functions, the join columns will only appear once in the output,
+ * i.e. similar to SQL's `JOIN USING` syntax.
+ *
+ * @param right Right side of the join operation.
+ * @param usingColumns Names of the columns to join on. This columns must exist on both sides.
+ * @param joinType Type of join to perform. Default `inner`. Must be one of:
+ * `inner`, `cross`, `outer`, `full`, `fullouter`, `full_outer`, `left`,
+ * `leftouter`, `left_outer`, `right`, `rightouter`, `right_outer`,
+ * `semi`, `leftsemi`, `left_semi`, `anti`, `leftanti`, left_anti`.
+ *
+ * @note If you perform a self-join using this function without aliasing the input
+ * `DataFrame`s, you will NOT be able to reference any columns after the join, since
+ * there is no way to disambiguate which side of the join you would like to reference.
+ *
+ * @group untypedrel
+ * @since 3.1.3
+ */
+ def join(right: Dataset[_], usingColumns: Array[String], joinType: String): DataFrame = {
+ join(right, usingColumns.toSeq, joinType)
+ }
+
/**
* Equi-join with another `DataFrame` using the given columns. A cross join with a predicate
Review comment:
Please add "(Scala-specific)" on other methods
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #33323:
URL: https://github.com/apache/spark/pull/33323#discussion_r669261605
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -956,6 +956,31 @@ class Dataset[T] private[sql](
join(right, Seq(usingColumn))
}
+ /**
+ * (Java-specific) Inner equi-join with another `DataFrame` using the given columns.
+ *
+ * Different from other join functions, the join columns will only appear once in the output,
+ * i.e. similar to SQL's `JOIN USING` syntax.
+ *
+ * {{{
+ * // Joining df1 and df2 using the columns "user_id" and "user_name"
+ * df1.join(df2, new String[] {"user_id", "user_name"});
+ * }}}
+ *
+ * @param right Right side of the join operation.
+ * @param usingColumns Names of the columns to join on. This columns must exist on both sides.
+ *
+ * @note If you perform a self-join using this function without aliasing the input
+ * `DataFrame`s, you will NOT be able to reference any columns after the join, since
+ * there is no way to disambiguate which side of the join you would like to reference.
+ *
+ * @group untypedrel
+ * @since 3.1.3
Review comment:
Let's target 3.3.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898941553
**[Test build #142470 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142470/testReport)** for PR 33323 at commit [`2314d1d`](https://github.com/apache/spark/commit/2314d1d41f26973a27f6576aeec2f7c6de6dff4f).
* This patch **fails to build**.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879577688
**[Test build #140994 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140994/testReport)** for PR 33323 at commit [`7beee40`](https://github.com/apache/spark/commit/7beee40113ccf7317143c51b123bca0d65d9a0c1).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] brandondahler commented on a change in pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
brandondahler commented on a change in pull request #33323:
URL: https://github.com/apache/spark/pull/33323#discussion_r690022929
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -970,7 +995,59 @@ class Dataset[T] private[sql](
}
/**
- * Equi-join with another `DataFrame` using the given columns. A cross join with a predicate
+ * Equi-join with another `DataFrame` using the given column. A cross join with a predicate
+ * is specified as an inner join. If you would explicitly like to perform a cross join use the
+ * `crossJoin` method.
+ *
+ * Different from other join functions, the join column will only appear once in the output,
+ * i.e. similar to SQL's `JOIN USING` syntax.
+ *
+ * @param right Right side of the join operation.
+ * @param usingColumn Name of the column to join on. This column must exist on both sides.
+ * @param joinType Type of join to perform. Default `inner`. Must be one of:
+ * `inner`, `cross`, `outer`, `full`, `fullouter`, `full_outer`, `left`,
+ * `leftouter`, `left_outer`, `right`, `rightouter`, `right_outer`,
+ * `semi`, `leftsemi`, `left_semi`, `anti`, `leftanti`, left_anti`.
+ *
+ * @note If you perform a self-join using this function without aliasing the input
+ * `DataFrame`s, you will NOT be able to reference any columns after the join, since
+ * there is no way to disambiguate which side of the join you would like to reference.
+ *
+ * @group untypedrel
+ * @since 3.3.0
+ */
+ def join(right: Dataset[_], usingColumn: String, joinType: String): DataFrame = {
+ join(right, Seq(usingColumn), joinType)
+ }
+
+ /**
+ * (Java-specific) Equi-join with another `DataFrame` using the given columns. A cross join with
Review comment:
The problem with the simple `[[join]]` link is that there's 8 total overloads that match that target reference.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] srowen commented on a change in pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
srowen commented on a change in pull request #33323:
URL: https://github.com/apache/spark/pull/33323#discussion_r688972950
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -970,7 +995,59 @@ class Dataset[T] private[sql](
}
/**
- * Equi-join with another `DataFrame` using the given columns. A cross join with a predicate
+ * Equi-join with another `DataFrame` using the given column. A cross join with a predicate
+ * is specified as an inner join. If you would explicitly like to perform a cross join use the
+ * `crossJoin` method.
+ *
+ * Different from other join functions, the join column will only appear once in the output,
+ * i.e. similar to SQL's `JOIN USING` syntax.
+ *
+ * @param right Right side of the join operation.
+ * @param usingColumn Name of the column to join on. This column must exist on both sides.
+ * @param joinType Type of join to perform. Default `inner`. Must be one of:
+ * `inner`, `cross`, `outer`, `full`, `fullouter`, `full_outer`, `left`,
+ * `leftouter`, `left_outer`, `right`, `rightouter`, `right_outer`,
+ * `semi`, `leftsemi`, `left_semi`, `anti`, `leftanti`, left_anti`.
+ *
+ * @note If you perform a self-join using this function without aliasing the input
+ * `DataFrame`s, you will NOT be able to reference any columns after the join, since
+ * there is no way to disambiguate which side of the join you would like to reference.
+ *
+ * @group untypedrel
+ * @since 3.3.0
+ */
+ def join(right: Dataset[_], usingColumn: String, joinType: String): DataFrame = {
+ join(right, Seq(usingColumn), joinType)
+ }
+
+ /**
+ * (Java-specific) Equi-join with another `DataFrame` using the given columns. A cross join with
Review comment:
I don't mind this at all but I'm also OK with just saying "see the Scala-specific overload' rather than duplicating docs. But I suppose we do this many places so w/e.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898951083
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/46978/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879742697
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140994/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898935621
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/142469/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898935621
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/142469/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898980430
Seems the tests passed but mind addressing https://github.com/apache/spark/pull/33323#discussion_r688972950 comment?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898941561
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879608954
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45508/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898940889
**[Test build #142470 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142470/testReport)** for PR 33323 at commit [`2314d1d`](https://github.com/apache/spark/commit/2314d1d41f26973a27f6576aeec2f7c6de6dff4f).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879715929
**[Test build #140994 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140994/testReport)** for PR 33323 at commit [`7beee40`](https://github.com/apache/spark/commit/7beee40113ccf7317143c51b123bca0d65d9a0c1).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] brandondahler commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
brandondahler commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898935139
Comments addressed, tests added, rebased onto current master.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #33323:
URL: https://github.com/apache/spark/pull/33323#discussion_r689952942
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -970,7 +995,59 @@ class Dataset[T] private[sql](
}
/**
- * Equi-join with another `DataFrame` using the given columns. A cross join with a predicate
+ * Equi-join with another `DataFrame` using the given column. A cross join with a predicate
+ * is specified as an inner join. If you would explicitly like to perform a cross join use the
+ * `crossJoin` method.
+ *
+ * Different from other join functions, the join column will only appear once in the output,
+ * i.e. similar to SQL's `JOIN USING` syntax.
+ *
+ * @param right Right side of the join operation.
+ * @param usingColumn Name of the column to join on. This column must exist on both sides.
+ * @param joinType Type of join to perform. Default `inner`. Must be one of:
+ * `inner`, `cross`, `outer`, `full`, `fullouter`, `full_outer`, `left`,
+ * `leftouter`, `left_outer`, `right`, `rightouter`, `right_outer`,
+ * `semi`, `leftsemi`, `left_semi`, `anti`, `leftanti`, left_anti`.
+ *
+ * @note If you perform a self-join using this function without aliasing the input
+ * `DataFrame`s, you will NOT be able to reference any columns after the join, since
+ * there is no way to disambiguate which side of the join you would like to reference.
+ *
+ * @group untypedrel
+ * @since 3.3.0
+ */
+ def join(right: Dataset[_], usingColumn: String, joinType: String): DataFrame = {
+ join(right, Seq(usingColumn), joinType)
+ }
+
+ /**
+ * (Java-specific) Equi-join with another `DataFrame` using the given columns. A cross join with
Review comment:
I think you can just simply link like `[[join]]`. If that link doesn't work, just simply writing it as prose should be fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898951083
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/46978/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879136851
Can one of the admins verify this patch?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879566146
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898941395
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46977/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #33323:
URL: https://github.com/apache/spark/pull/33323#discussion_r669261712
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -956,6 +956,31 @@ class Dataset[T] private[sql](
join(right, Seq(usingColumn))
}
+ /**
+ * (Java-specific) Inner equi-join with another `DataFrame` using the given columns.
+ *
+ * Different from other join functions, the join columns will only appear once in the output,
+ * i.e. similar to SQL's `JOIN USING` syntax.
+ *
+ * {{{
+ * // Joining df1 and df2 using the columns "user_id" and "user_name"
+ * df1.join(df2, new String[] {"user_id", "user_name"});
+ * }}}
+ *
+ * @param right Right side of the join operation.
+ * @param usingColumns Names of the columns to join on. This columns must exist on both sides.
+ *
+ * @note If you perform a self-join using this function without aliasing the input
+ * `DataFrame`s, you will NOT be able to reference any columns after the join, since
+ * there is no way to disambiguate which side of the join you would like to reference.
+ *
+ * @group untypedrel
+ * @since 3.1.3
+ */
+ def join(right: Dataset[_], usingColumns: Array[String]): DataFrame = {
+ join(right, usingColumns.toSeq)
+ }
+
/**
* Inner equi-join with another `DataFrame` using the given columns.
Review comment:
Can you add "(Scala-specific)" here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898940784
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46976/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898947740
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/46976/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-879608970
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/45508/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #33323: [SPARK-35739][SQL] Add Java-compatible Dataset.join overloads
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #33323:
URL: https://github.com/apache/spark/pull/33323#issuecomment-898946324
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/46978/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org