[GitHub] spark pull request #19772: [SPARK-22538][ML] SQLTransformer should not unper...

2017-11-17 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/19772#discussion_r151815120
  
--- Diff: 
mllib/src/main/scala/org/apache/spark/ml/feature/SQLTransformer.scala ---
@@ -70,7 +70,8 @@ class SQLTransformer @Since("1.6.0") (@Since("1.6.0") 
override val uid: String)
 dataset.createOrReplaceTempView(tableName)
 val realStatement = $(statement).replace(tableIdentifier, tableName)
 val result = dataset.sparkSession.sql(realStatement)
-dataset.sparkSession.catalog.dropTempView(tableName)
--- End diff --

Hmm, but the behavior is explicitly defined at `Catalog`. This should be a 
public API. We may not easily change it.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #19772: [SPARK-22538][ML] SQLTransformer should not unper...

2017-11-17 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/19772#discussion_r151813095
  
--- Diff: 
mllib/src/main/scala/org/apache/spark/ml/feature/SQLTransformer.scala ---
@@ -70,7 +70,8 @@ class SQLTransformer @Since("1.6.0") (@Since("1.6.0") 
override val uid: String)
 dataset.createOrReplaceTempView(tableName)
 val realStatement = $(statement).replace(tableIdentifier, tableName)
 val result = dataset.sparkSession.sql(realStatement)
-dataset.sparkSession.catalog.dropTempView(tableName)
--- End diff --

Yes. I also think it doesn't make a lot sense.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #19772: [SPARK-22538][ML] SQLTransformer should not unper...

2017-11-17 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/19772


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #19772: [SPARK-22538][ML] SQLTransformer should not unper...

2017-11-17 Thread cloud-fan
Github user cloud-fan commented on a diff in the pull request:

https://github.com/apache/spark/pull/19772#discussion_r151732579
  
--- Diff: 
mllib/src/main/scala/org/apache/spark/ml/feature/SQLTransformer.scala ---
@@ -70,7 +70,8 @@ class SQLTransformer @Since("1.6.0") (@Since("1.6.0") 
override val uid: String)
 dataset.createOrReplaceTempView(tableName)
 val realStatement = $(statement).replace(tableIdentifier, tableName)
 val result = dataset.sparkSession.sql(realStatement)
-dataset.sparkSession.catalog.dropTempView(tableName)
--- End diff --

It seems like a bug: when you cache a dataframe, create a view from the 
dataframe, and drop the view, Spark should not uncache the original dataframe. 
We can discuss more later.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org