Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

[BAHIR-256] Fix ClassCastException in sql-streaming-mqtt #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcpeanutbutter
Copy link

As described in https://issues.apache.org/jira/projects/BAHIR/issues/BAHIR-256, currently the usage of the topic or timestamp columns in sql-streaming-mqtt throws ClassCastExceptions after batch 0.

From my testing, this issue can be mitigated by a simple type conversion (analogous to https://github.com/Azure/spark-cdm/pull/4/files, which apparently resolved a very similar exception).

I added the necessary conversions to org/apache/bahir/sql/streaming/mqtt/MQTTStreamSource.scala.

In org/apache/bahir/sql/streaming/mqtt/MQTTStreamSource.scala, added conversions to the 'topic' and 'timestamp' fields in order to make them compatible with Spark SQL.
@eskabetxe
Copy link
Member

@mcpeanutbutter thanks for your contribution
could you add some test

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants