lf-edge / ekuiper

Lightweight data stream processing engine for IoT edge
https://ekuiper.org
Apache License 2.0
1.47k stars 413 forks source link

Inconsistent results from binary vs json stream query #1219

Closed wtflanders closed 1 year ago

wtflanders commented 2 years ago

I need to extract both the mqtt topic and the data from a stream in my rule. It works if the stream is BINARY, it does NOT work if the stream is JSON.

This query works: ./kuiper create stream 'test_binary_stream() WITH ( datasource = "data/#", FORMAT= "BINARY", KEY = "id")' with query: SELECT mqtt(test_binary_stream.topic), self FROM test_binary_stream

This query does NOT work: ./kuiper create stream 'test_stream() WITH ( datasource = "data/#", FORMAT= "JSON", KEY = "id")' SELECT mqtt(test_stream.topic), self FROM test_stream

Environment:

What happened and what you expected to happen: Query to BINARY and JSON streams should both work as the BINARY stream query does.

How to reproduce it (as minimally and precisely as possible): see above

Anything else we need to know?:

superrxan commented 2 years ago

Duplicate of #787

when 787 fixed, you should be able to write SQL like this

select mqtt(test_stream.topic), * FROM test_stream