Skip to content

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

Open
@rchowell

Description

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.

Metadata

Assignees

No one assigned

    Labels

    V1This is related to the V1 release of PartiQL.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions