confluentinc / confluentinc/ksql
ARRAYCONTAINS support of Array of Structs
- Dominant language
- Java
- Stars
- 315
- Forks
- 1k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 36
Description
Hi,
I'm using Confluent [cp-all-in-one with docker](https://docs.confluent.io/current/quickstart/cos-docker-quickstart.html) (v5.4.1), and I'm confused on how to use ARRAYCONTAINS (or another feature) for Arrays of Structs.
Regarding the example below, is there a way, currently supported by Confluent in KSQL, to create a STREAM that filters on records that have at least one friend with "first_name" = "John" ?
Example of record (the array "myNiceArrayOfFriends has 2 entries with "first_name" = "John" :
```
"myFirstField": (...),
"myNiceArrayOfFriends": [
{
"id": "0",
"name": {
"first_name": "John",
"last_name": "Doe"
}
},
{
"id": "1",
"name": {
"first_name": "Jane",
"last_name": "Doe"
}
},
{
"id": "2",
"name": {
"first_name": "John",
"last_name": "Lennon"
}
}
],
"someOtherField": (...)
```
Contributor guide
Research direction
Start by checking the documented ARRAYCONTAINS behavior and KSQL query support for arrays of structs, using the example record in the issue as the reproduction case. Determine whether filtering on a nested first_name is supported; if not, identify the relevant query-language entry point and tests needed to define the feature and its expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- stream-processing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100