You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ra...@apache.org on 2018/01/28 06:45:41 UTC
[12/50] [abbrv] carbondata git commit: [CARBONDATA-2011] Fix
ClassCastException in CarbonStreamingQueryListener
[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/fgdatamap
Commit: 3eb1e2b30d64137293dd1d7985883c0ef75646ae
Parents: 082a355
Author: QiangCai <qi...@qq.com>
Authored: Tue Jan 9 19:07:19 2018 +0800
Committer: Jacky Li <ja...@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 {