ksql-test-runner fails to match outputs with structs in it.
Describe the bug ksql-test-runner fails to match outputs with structs in it.
To Reproduce
Steps to reproduce the behavior, include:
create a statement which creates struct like this SELECT STRUCT(SOME_COL := 1234, TYPE := 'SOME_TYPE') as Subject
FROM INPUT_TOPIC;
Expected behavior our output file has rows like this { "outputs": [ {"topic": "test_topic", "timestamp": 0, "key": 1, "value": {"Subject":{"SOME_COL": 1234, "TYPE": "SOME_TYPE"}}}, ] }
Actual behaviour Test is failing as it is not able to match
Hello @rahulbats - it looks like you've flipped the struct definition. The syntax is STRUCT(col_name := col_value). Pleaes read https://docs.ksqldb.io/en/latest/how-to-guides/query-structured-data/#structs for an example.
Closing out this ticket.
Seems like it was a typo, @rahulbats will update the description
I have encountered the same situation. Please any update or workaround on testing this Struct-key type?
ksql-test-runner doesn't output the correct format of data when using STRUCTs, however in the cases I've used it does match the expected output and actual output correctly. Debugging is confusing due to the debug output showing SOME_COL := 1234, TYPE := 'SOME_TYPE', rather than the actual format of "SOME_COL": 1234, "TYPE": "SOME_TYPE". Could the debug output be displayed as JSON to reduce confusion?