carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject carbondata git commit: [CARBONDATA-2011] Fix ClassCastException in CarbonStreamingQueryListener
Date Thu, 11 Jan 2018 01:28:57 GMT
Repository: carbondata
Updated Branches:
  refs/heads/master 082a3559a -> 3eb1e2b30


[CARBONDATA-2011] Fix ClassCastException in CarbonStreamingQueryListener

Fix ClassCastException in CarbonStreamingQueryListener for Spark 2.1 integration

This closes #1779


Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/3eb1e2b3
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/3eb1e2b3
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/3eb1e2b3

Branch: refs/heads/master
Commit: 3eb1e2b30d64137293dd1d7985883c0ef75646ae
Parents: 082a355
Author: QiangCai <qiangcai@qq.com>
Authored: Tue Jan 9 19:07:19 2018 +0800
Committer: Jacky Li <jacky.likun@qq.com>
Committed: Thu Jan 11 09:28:42 2018 +0800

----------------------------------------------------------------------
 .../sql/execution/streaming/CarbonStreamingQueryListener.scala     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/3eb1e2b3/streaming/src/main/scala/org/apache/spark/sql/execution/streaming/CarbonStreamingQueryListener.scala
----------------------------------------------------------------------
diff --git a/streaming/src/main/scala/org/apache/spark/sql/execution/streaming/CarbonStreamingQueryListener.scala
b/streaming/src/main/scala/org/apache/spark/sql/execution/streaming/CarbonStreamingQueryListener.scala
index 07ef8ca..2f911c5 100644
--- a/streaming/src/main/scala/org/apache/spark/sql/execution/streaming/CarbonStreamingQueryListener.scala
+++ b/streaming/src/main/scala/org/apache/spark/sql/execution/streaming/CarbonStreamingQueryListener.scala
@@ -35,7 +35,7 @@ class CarbonStreamingQueryListener(spark: SparkSession) extends StreamingQueryLi
 
   override def onQueryStarted(event: StreamingQueryListener.QueryStartedEvent): Unit = {
     val streamQuery = spark.streams.get(event.id)
-    val qry = if (SPARK_VERSION.startsWith("2.1")) {
+    val qry = if (streamQuery.isInstanceOf[StreamExecution]) {
       // adapt spark 2.1
       streamQuery.asInstanceOf[StreamExecution]
     } else {


Mime
View raw message