Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V1] Missing length arguments for ARRAY and BAG #1686

Open
RCHowell opened this issue Dec 18, 2024 · 0 comments
Open

[V1] Missing length arguments for ARRAY and BAG #1686

RCHowell opened this issue Dec 18, 2024 · 0 comments
Labels
bug Something isn't working V1 This is related to the V1 release of PartiQL.

Comments

@RCHowell
Copy link
Member

Description

SQL-99 defines a collection type as,

<collection type> ::=
         <data type> <array specification>

<array specification> ::=
       <collection type constructor> <data type> <left bracket or trigraph> <unsigned integer> <right bracket or trigraph>

<collection type constructor> ::= ARRAY

# aka

INT ARRAY[10]

PartiQL defines the extensions for bags and familiar HIVE syntax

-- 1
T ARRAY[N] <=> ARRAY<T>[N]

-- 2
ARRAY[N] <=> DYANMIC ARRAY[N] <=> ARRAY<DYNAMIC>[N]

-- 3
ARRAY <=> DYNAMIC ARRAY <=> ARRAY<DYNAMIC> <=> LIST

-- 1
T BAG[N] <=> BAG<T>[N]

-- 2
BAG[N] <=> DYANMIC BAG[N] <=> BAG<DYNAMIC>[N]

-- 3
BAG <=> DYNAMIC BAG <=> BAG<DYNAMIC>

But partiql-lang-kotlin does not support defining a length-constrained collection per SQL.

Expected Behavior

You can define INT ARRAY[N] where N is <unsigned integer>.

Additional Context

  • PartiQL version: 1.0.0-rc.3
  • Add any other context about the problem here.
@RCHowell RCHowell added bug Something isn't working V1 This is related to the V1 release of PartiQL. labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working V1 This is related to the V1 release of PartiQL.
Projects
None yet
Development

No branches or pull requests

1 participant