confluentinc / confluentinc/ksql
Explicit Typing for Array/Map Creation
- Dominant language
- Java
- Stars
- 315
- Forks
- 1k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 36
Description
**Is your feature request related to a problem? Please describe.**
It is impossible today to create an array with empty or null only elements because the type cannot be inferred. Furthermore, users may want to be able to cast inner elements of an array to adhere to a specific type. The same problem applies to maps.
**Describe the solution you'd like**
We could follow the lead of Postgres and use something like `ARRAY[]::int[]` but this requires more thought and discussion.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
See #4232
Contributor guide
Research direction
Begin by reading the related issue #4232 and the proposed PostgreSQL-style `ARRAY[]::int[]` syntax. Resolve how explicit typing should work for empty or null-only arrays and maps, including the syntax and alternatives. The work is done when the design is agreed and the behavior is specified for both collection types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases, stream-processing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100