Github user tianyi commented on a diff in the pull request:
https://github.com/apache/spark/pull/3375#discussion_r21435396
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashOuterJoin.scala
---
@@ -68,62 +68,59 @@ case class HashOuterJoin(
@transient private[this] lazy val DUMMY_LIST = Seq[Row](null)
@transient private[this] lazy val EMPTY_LIST = Seq.empty[Row]
+ @transient private[this] lazy val joinedRow = new JoinedRow()
--- End diff --
Hi, @marmbrus
I have tested these codes in following way:
1 Added the following codes in `leftOuterIterator` before return the
iterator
```
System.out.println("["+Thread.currentThread().getName+"]The hashcode of
joinedRow = ["+ System.identityHashCode(joinedRow) +"]");
```
2 I started a thriftserver with `-Dspark.master=local[4]` properties to
make sure there are 4 tasks running in the same JVM.
3 Then I run a sql like (same table and data with my benchmark test):
```
select count(1) from test_csv a left outer join dim_csv b on a.key = b.key;
```
4 I got the following logs:
```
[Executor task launch worker-0]The hashcode of joinedRow = [155362507]
[Executor task launch worker-1]The hashcode of joinedRow = [2032520348]
[Executor task launch worker-2]The hashcode of joinedRow = [1382003837]
[Executor task launch worker-3]The hashcode of joinedRow = [459410904]
[Executor task launch worker-2]The hashcode of joinedRow = [1382003837]
[Executor task launch worker-1]The hashcode of joinedRow = [2032520348]
[Executor task launch worker-0]The hashcode of joinedRow = [155362507]
[Executor task launch worker-1]The hashcode of joinedRow = [2032520348]
[Executor task launch worker-2]The hashcode of joinedRow = [1382003837]
[Executor task launch worker-3]The hashcode of joinedRow = [459410904]
```
I think that proved the codes should working fine under mutible tasks
running in the same JVM.
---
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]