confluentinc / confluentinc/ksql

Explicit Typing for Array/Map Creation

Open
#4,239 2 comments 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.