-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: reintroduce FetchFieldFromStruct as a public UDF (#4185)
- Loading branch information
Showing
5 changed files
with
44 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
ksql-functional-tests/src/test/resources/query-validation-tests/fetch-field-from-struct.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"comments": [ | ||
"External usage of FETCH_FIELD_FROM_STRUCT" | ||
], | ||
"tests": [ | ||
{ | ||
"name": "Fetch Field", | ||
"statements": [ | ||
"CREATE STREAM TEST (s STRUCT<val VARCHAR>) WITH (kafka_topic='test_topic', value_format='JSON');", | ||
"CREATE STREAM OUTPUT as SELECT FETCH_FIELD_FROM_STRUCT(s, 'VAL') AS value FROM test;" | ||
], | ||
"inputs": [ | ||
{"topic": "test_topic", "key": "foo", "value": {"s": {"val": "foo"}}} | ||
], | ||
"outputs": [ | ||
{"topic": "OUTPUT", "key": "foo", "value": {"VALUE": "foo"}} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters