Github user QiangCai commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1611#discussion_r155136943
--- Diff:
streaming/src/main/scala/org/apache/spark/sql/execution/streaming/CarbonStreamingQueryListener.scala
---
@@ -33,7 +33,16 @@ class CarbonStreamingQueryListener(spark: SparkSession)
extends StreamingQueryLi
private val cache = new util.HashMap[UUID, ICarbonLock]()
override def onQueryStarted(event:
StreamingQueryListener.QueryStartedEvent): Unit = {
- val qry = spark.streams.get(event.id).asInstanceOf[StreamExecution]
+ val streamQuery = spark.streams.get(event.id)
+ val qry = if (streamQuery.isInstanceOf[StreamExecution]) {
--- End diff --
fixed
---