[GitHub] spark pull request #13283: [SPARK-15515] [SQL] Error Handling in Running SQL...

2016-06-02 Thread tedyu
Github user tedyu commented on a diff in the pull request:

https://github.com/apache/spark/pull/13283#discussion_r65629823
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala 
---
@@ -38,6 +40,16 @@ private[sql] class ResolveDataSource(sparkSession: 
SparkSession) extends Rule[Lo
   sparkSession,
   paths = u.tableIdentifier.table :: Nil,
   className = u.tableIdentifier.database.get)
+
+val notSupportDirectQuery = try {
+  !classOf[FileFormat].isAssignableFrom(dataSource.providingClass)
+} catch {
+  case NonFatal(e) => false
--- End diff --

Thanks Ryan.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #13283: [SPARK-15515] [SQL] Error Handling in Running SQL...

2016-06-02 Thread zsxwing
Github user zsxwing commented on a diff in the pull request:

https://github.com/apache/spark/pull/13283#discussion_r65624975
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala 
---
@@ -38,6 +40,16 @@ private[sql] class ResolveDataSource(sparkSession: 
SparkSession) extends Rule[Lo
   sparkSession,
   paths = u.tableIdentifier.table :: Nil,
   className = u.tableIdentifier.database.get)
+
+val notSupportDirectQuery = try {
+  !classOf[FileFormat].isAssignableFrom(dataSource.providingClass)
+} catch {
+  case NonFatal(e) => false
--- End diff --

@tedyu If people use `select * from db_name.table_name`, it will throw an 
exception. Still need to continue for such cases.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #13283: [SPARK-15515] [SQL] Error Handling in Running SQL...

2016-06-02 Thread tedyu
Github user tedyu commented on a diff in the pull request:

https://github.com/apache/spark/pull/13283#discussion_r65622737
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala 
---
@@ -38,6 +40,16 @@ private[sql] class ResolveDataSource(sparkSession: 
SparkSession) extends Rule[Lo
   sparkSession,
   paths = u.tableIdentifier.table :: Nil,
   className = u.tableIdentifier.database.get)
+
+val notSupportDirectQuery = try {
+  !classOf[FileFormat].isAssignableFrom(dataSource.providingClass)
+} catch {
+  case NonFatal(e) => false
--- End diff --

When would this happen ?

Should true be returned here ?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #13283: [SPARK-15515] [SQL] Error Handling in Running SQL...

2016-06-02 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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