diff --git a/partiql-ast/api/partiql-ast.api b/partiql-ast/api/partiql-ast.api index ce7f25c0e7..b076c8faa4 100644 --- a/partiql-ast/api/partiql-ast.api +++ b/partiql-ast/api/partiql-ast.api @@ -5,7 +5,7 @@ public final class org/partiql/ast/Ast { public static final fun constraintDefinitionNullable ()Lorg/partiql/ast/Constraint$Definition$Nullable; public static final fun constraintDefinitionUnique (Ljava/util/List;Z)Lorg/partiql/ast/Constraint$Definition$Unique; public static final fun ddlOpCreateIndex (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/Identifier;Ljava/util/List;)Lorg/partiql/ast/DdlOp$CreateIndex; - public static final fun ddlOpCreateTable (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;Lorg/partiql/ast/PartitionBy;Ljava/util/List;)Lorg/partiql/ast/DdlOp$CreateTable; + public static final fun ddlOpCreateTable (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;)Lorg/partiql/ast/DdlOp$CreateTable; public static final fun ddlOpDropIndex (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/Identifier;)Lorg/partiql/ast/DdlOp$DropIndex; public static final fun ddlOpDropTable (Lorg/partiql/ast/Identifier;)Lorg/partiql/ast/DdlOp$DropTable; public static final fun exclude (Ljava/util/List;)Lorg/partiql/ast/Exclude; @@ -90,7 +90,6 @@ public final class org/partiql/ast/Ast { public static final fun onConflictTargetConstraint (Lorg/partiql/ast/Identifier;)Lorg/partiql/ast/OnConflict$Target$Constraint; public static final fun onConflictTargetSymbols (Ljava/util/List;)Lorg/partiql/ast/OnConflict$Target$Symbols; public static final fun orderBy (Ljava/util/List;)Lorg/partiql/ast/OrderBy; - public static final fun partitionByAttrList (Ljava/util/List;)Lorg/partiql/ast/PartitionBy$AttrList; public static final fun path (Lorg/partiql/ast/Identifier$Symbol;Ljava/util/List;)Lorg/partiql/ast/Path; public static final fun pathStepIndex (I)Lorg/partiql/ast/Path$Step$Index; public static final fun pathStepSymbol (Lorg/partiql/ast/Identifier$Symbol;)Lorg/partiql/ast/Path$Step$Symbol; @@ -127,8 +126,7 @@ public final class org/partiql/ast/Ast { public static final fun statementExplainTargetDomain (Lorg/partiql/ast/Statement;Ljava/lang/String;Ljava/lang/String;)Lorg/partiql/ast/Statement$Explain$Target$Domain; public static final fun statementQuery (Lorg/partiql/ast/Expr;)Lorg/partiql/ast/Statement$Query; public static final fun tableDefinition (Ljava/util/List;Ljava/util/List;)Lorg/partiql/ast/TableDefinition; - public static final fun tableDefinitionAttribute (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ZLjava/lang/String;)Lorg/partiql/ast/TableDefinition$Attribute; - public static final fun tableProperty (Ljava/lang/String;Lorg/partiql/value/PartiQLValue;)Lorg/partiql/ast/TableProperty; + public static final fun tableDefinitionAttribute (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;)Lorg/partiql/ast/TableDefinition$Attribute; public static final fun typeAny ()Lorg/partiql/ast/Type$Any; public static final fun typeArray (Lorg/partiql/ast/Type;)Lorg/partiql/ast/Type$Array; public static final fun typeBag ()Lorg/partiql/ast/Type$Bag; @@ -159,7 +157,7 @@ public final class org/partiql/ast/Ast { public static final fun typeSmallint ()Lorg/partiql/ast/Type$Smallint; public static final fun typeString (Ljava/lang/Integer;)Lorg/partiql/ast/Type$String; public static final fun typeStruct (Ljava/util/List;)Lorg/partiql/ast/Type$Struct; - public static final fun typeStructField (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ZLjava/lang/String;)Lorg/partiql/ast/Type$Struct$Field; + public static final fun typeStructField (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;)Lorg/partiql/ast/Type$Struct$Field; public static final fun typeSymbol ()Lorg/partiql/ast/Type$Symbol; public static final fun typeTime (Ljava/lang/Integer;)Lorg/partiql/ast/Type$Time; public static final fun typeTimeWithTz (Ljava/lang/Integer;)Lorg/partiql/ast/Type$TimeWithTz; @@ -328,17 +326,13 @@ public final class org/partiql/ast/DdlOp$CreateTable : org/partiql/ast/DdlOp { public static final field Companion Lorg/partiql/ast/DdlOp$CreateTable$Companion; public final field definition Lorg/partiql/ast/TableDefinition; public final field name Lorg/partiql/ast/Identifier; - public final field partitionBy Lorg/partiql/ast/PartitionBy; - public final field tableProperties Ljava/util/List; - public fun (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;Lorg/partiql/ast/PartitionBy;Ljava/util/List;)V + public fun (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;)V public fun accept (Lorg/partiql/ast/visitor/AstVisitor;Ljava/lang/Object;)Ljava/lang/Object; public static final fun builder ()Lorg/partiql/ast/builder/DdlOpCreateTableBuilder; public final fun component1 ()Lorg/partiql/ast/Identifier; public final fun component2 ()Lorg/partiql/ast/TableDefinition; - public final fun component3 ()Lorg/partiql/ast/PartitionBy; - public final fun component4 ()Ljava/util/List; - public final fun copy (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;Lorg/partiql/ast/PartitionBy;Ljava/util/List;)Lorg/partiql/ast/DdlOp$CreateTable; - public static synthetic fun copy$default (Lorg/partiql/ast/DdlOp$CreateTable;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;Lorg/partiql/ast/PartitionBy;Ljava/util/List;ILjava/lang/Object;)Lorg/partiql/ast/DdlOp$CreateTable; + public final fun copy (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;)Lorg/partiql/ast/DdlOp$CreateTable; + public static synthetic fun copy$default (Lorg/partiql/ast/DdlOp$CreateTable;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;ILjava/lang/Object;)Lorg/partiql/ast/DdlOp$CreateTable; public fun equals (Ljava/lang/Object;)Z public fun getChildren ()Ljava/util/List; public fun hashCode ()I @@ -2277,29 +2271,6 @@ public final class org/partiql/ast/OrderBy$Companion { public final fun builder ()Lorg/partiql/ast/builder/OrderByBuilder; } -public abstract class org/partiql/ast/PartitionBy : org/partiql/ast/AstNode { - public fun accept (Lorg/partiql/ast/visitor/AstVisitor;Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class org/partiql/ast/PartitionBy$AttrList : org/partiql/ast/PartitionBy { - public static final field Companion Lorg/partiql/ast/PartitionBy$AttrList$Companion; - public final field list Ljava/util/List; - public fun (Ljava/util/List;)V - public fun accept (Lorg/partiql/ast/visitor/AstVisitor;Ljava/lang/Object;)Ljava/lang/Object; - public static final fun builder ()Lorg/partiql/ast/builder/PartitionByAttrListBuilder; - public final fun component1 ()Ljava/util/List; - public final fun copy (Ljava/util/List;)Lorg/partiql/ast/PartitionBy$AttrList; - public static synthetic fun copy$default (Lorg/partiql/ast/PartitionBy$AttrList;Ljava/util/List;ILjava/lang/Object;)Lorg/partiql/ast/PartitionBy$AttrList; - public fun equals (Ljava/lang/Object;)Z - public fun getChildren ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class org/partiql/ast/PartitionBy$AttrList$Companion { - public final fun builder ()Lorg/partiql/ast/builder/PartitionByAttrListBuilder; -} - public final class org/partiql/ast/Path : org/partiql/ast/AstNode { public static final field Companion Lorg/partiql/ast/Path$Companion; public final field root Lorg/partiql/ast/Identifier$Symbol; @@ -3141,21 +3112,17 @@ public final class org/partiql/ast/TableDefinition : org/partiql/ast/AstNode { public final class org/partiql/ast/TableDefinition$Attribute : org/partiql/ast/AstNode { public static final field Companion Lorg/partiql/ast/TableDefinition$Attribute$Companion; - public final field comment Ljava/lang/String; public final field constraints Ljava/util/List; - public final field isOptional Z public final field name Lorg/partiql/ast/Identifier$Symbol; public final field type Lorg/partiql/ast/Type; - public fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ZLjava/lang/String;)V + public fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;)V public fun accept (Lorg/partiql/ast/visitor/AstVisitor;Ljava/lang/Object;)Ljava/lang/Object; public static final fun builder ()Lorg/partiql/ast/builder/TableDefinitionAttributeBuilder; public final fun component1 ()Lorg/partiql/ast/Identifier$Symbol; public final fun component2 ()Lorg/partiql/ast/Type; public final fun component3 ()Ljava/util/List; - public final fun component4 ()Z - public final fun component5 ()Ljava/lang/String; - public final fun copy (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ZLjava/lang/String;)Lorg/partiql/ast/TableDefinition$Attribute; - public static synthetic fun copy$default (Lorg/partiql/ast/TableDefinition$Attribute;Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ZLjava/lang/String;ILjava/lang/Object;)Lorg/partiql/ast/TableDefinition$Attribute; + public final fun copy (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;)Lorg/partiql/ast/TableDefinition$Attribute; + public static synthetic fun copy$default (Lorg/partiql/ast/TableDefinition$Attribute;Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ILjava/lang/Object;)Lorg/partiql/ast/TableDefinition$Attribute; public fun equals (Ljava/lang/Object;)Z public fun getChildren ()Ljava/util/List; public fun hashCode ()I @@ -3170,27 +3137,6 @@ public final class org/partiql/ast/TableDefinition$Companion { public final fun builder ()Lorg/partiql/ast/builder/TableDefinitionBuilder; } -public final class org/partiql/ast/TableProperty : org/partiql/ast/AstNode { - public static final field Companion Lorg/partiql/ast/TableProperty$Companion; - public final field name Ljava/lang/String; - public final field value Lorg/partiql/value/PartiQLValue; - public fun (Ljava/lang/String;Lorg/partiql/value/PartiQLValue;)V - public fun accept (Lorg/partiql/ast/visitor/AstVisitor;Ljava/lang/Object;)Ljava/lang/Object; - public static final fun builder ()Lorg/partiql/ast/builder/TablePropertyBuilder; - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Lorg/partiql/value/PartiQLValue; - public final fun copy (Ljava/lang/String;Lorg/partiql/value/PartiQLValue;)Lorg/partiql/ast/TableProperty; - public static synthetic fun copy$default (Lorg/partiql/ast/TableProperty;Ljava/lang/String;Lorg/partiql/value/PartiQLValue;ILjava/lang/Object;)Lorg/partiql/ast/TableProperty; - public fun equals (Ljava/lang/Object;)Z - public fun getChildren ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class org/partiql/ast/TableProperty$Companion { - public final fun builder ()Lorg/partiql/ast/builder/TablePropertyBuilder; -} - public abstract class org/partiql/ast/Type : org/partiql/ast/AstNode { public fun accept (Lorg/partiql/ast/visitor/AstVisitor;Ljava/lang/Object;)Ljava/lang/Object; } @@ -3805,21 +3751,17 @@ public final class org/partiql/ast/Type$Struct$Companion { public final class org/partiql/ast/Type$Struct$Field : org/partiql/ast/AstNode { public static final field Companion Lorg/partiql/ast/Type$Struct$Field$Companion; - public final field comment Ljava/lang/String; public final field constraints Ljava/util/List; - public final field isOptional Z public final field name Lorg/partiql/ast/Identifier$Symbol; public final field type Lorg/partiql/ast/Type; - public fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ZLjava/lang/String;)V + public fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;)V public fun accept (Lorg/partiql/ast/visitor/AstVisitor;Ljava/lang/Object;)Ljava/lang/Object; public static final fun builder ()Lorg/partiql/ast/builder/TypeStructFieldBuilder; public final fun component1 ()Lorg/partiql/ast/Identifier$Symbol; public final fun component2 ()Lorg/partiql/ast/Type; public final fun component3 ()Ljava/util/List; - public final fun component4 ()Z - public final fun component5 ()Ljava/lang/String; - public final fun copy (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ZLjava/lang/String;)Lorg/partiql/ast/Type$Struct$Field; - public static synthetic fun copy$default (Lorg/partiql/ast/Type$Struct$Field;Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ZLjava/lang/String;ILjava/lang/Object;)Lorg/partiql/ast/Type$Struct$Field; + public final fun copy (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;)Lorg/partiql/ast/Type$Struct$Field; + public static synthetic fun copy$default (Lorg/partiql/ast/Type$Struct$Field;Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ILjava/lang/Object;)Lorg/partiql/ast/Type$Struct$Field; public fun equals (Ljava/lang/Object;)Z public fun getChildren ()Ljava/util/List; public fun hashCode ()I @@ -4002,8 +3944,8 @@ public final class org/partiql/ast/builder/AstBuilder { public static synthetic fun constraintDefinitionUnique$default (Lorg/partiql/ast/builder/AstBuilder;Ljava/util/List;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/Constraint$Definition$Unique; public final fun ddlOpCreateIndex (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/Identifier;Ljava/util/List;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/DdlOp$CreateIndex; public static synthetic fun ddlOpCreateIndex$default (Lorg/partiql/ast/builder/AstBuilder;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/Identifier;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/DdlOp$CreateIndex; - public final fun ddlOpCreateTable (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;Lorg/partiql/ast/PartitionBy;Ljava/util/List;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/DdlOp$CreateTable; - public static synthetic fun ddlOpCreateTable$default (Lorg/partiql/ast/builder/AstBuilder;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;Lorg/partiql/ast/PartitionBy;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/DdlOp$CreateTable; + public final fun ddlOpCreateTable (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/DdlOp$CreateTable; + public static synthetic fun ddlOpCreateTable$default (Lorg/partiql/ast/builder/AstBuilder;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/DdlOp$CreateTable; public final fun ddlOpDropIndex (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/Identifier;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/DdlOp$DropIndex; public static synthetic fun ddlOpDropIndex$default (Lorg/partiql/ast/builder/AstBuilder;Lorg/partiql/ast/Identifier;Lorg/partiql/ast/Identifier;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/DdlOp$DropIndex; public final fun ddlOpDropTable (Lorg/partiql/ast/Identifier;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/DdlOp$DropTable; @@ -4172,8 +4114,6 @@ public final class org/partiql/ast/builder/AstBuilder { public static synthetic fun onConflictTargetSymbols$default (Lorg/partiql/ast/builder/AstBuilder;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/OnConflict$Target$Symbols; public final fun orderBy (Ljava/util/List;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/OrderBy; public static synthetic fun orderBy$default (Lorg/partiql/ast/builder/AstBuilder;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/OrderBy; - public final fun partitionByAttrList (Ljava/util/List;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/PartitionBy$AttrList; - public static synthetic fun partitionByAttrList$default (Lorg/partiql/ast/builder/AstBuilder;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/PartitionBy$AttrList; public final fun path (Lorg/partiql/ast/Identifier$Symbol;Ljava/util/List;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/Path; public static synthetic fun path$default (Lorg/partiql/ast/builder/AstBuilder;Lorg/partiql/ast/Identifier$Symbol;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/Path; public final fun pathStepIndex (Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/Path$Step$Index; @@ -4246,10 +4186,8 @@ public final class org/partiql/ast/builder/AstBuilder { public static synthetic fun statementQuery$default (Lorg/partiql/ast/builder/AstBuilder;Lorg/partiql/ast/Expr;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/Statement$Query; public final fun tableDefinition (Ljava/util/List;Ljava/util/List;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/TableDefinition; public static synthetic fun tableDefinition$default (Lorg/partiql/ast/builder/AstBuilder;Ljava/util/List;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/TableDefinition; - public final fun tableDefinitionAttribute (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/TableDefinition$Attribute; - public static synthetic fun tableDefinitionAttribute$default (Lorg/partiql/ast/builder/AstBuilder;Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/TableDefinition$Attribute; - public final fun tableProperty (Ljava/lang/String;Lorg/partiql/value/PartiQLValue;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/TableProperty; - public static synthetic fun tableProperty$default (Lorg/partiql/ast/builder/AstBuilder;Ljava/lang/String;Lorg/partiql/value/PartiQLValue;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/TableProperty; + public final fun tableDefinitionAttribute (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/TableDefinition$Attribute; + public static synthetic fun tableDefinitionAttribute$default (Lorg/partiql/ast/builder/AstBuilder;Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/TableDefinition$Attribute; public final fun typeAny (Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/Type$Any; public static synthetic fun typeAny$default (Lorg/partiql/ast/builder/AstBuilder;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/Type$Any; public final fun typeArray (Lorg/partiql/ast/Type;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/Type$Array; @@ -4310,8 +4248,8 @@ public final class org/partiql/ast/builder/AstBuilder { public static synthetic fun typeString$default (Lorg/partiql/ast/builder/AstBuilder;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/Type$String; public final fun typeStruct (Ljava/util/List;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/Type$Struct; public static synthetic fun typeStruct$default (Lorg/partiql/ast/builder/AstBuilder;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/Type$Struct; - public final fun typeStructField (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/Type$Struct$Field; - public static synthetic fun typeStructField$default (Lorg/partiql/ast/builder/AstBuilder;Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/Type$Struct$Field; + public final fun typeStructField (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/Type$Struct$Field; + public static synthetic fun typeStructField$default (Lorg/partiql/ast/builder/AstBuilder;Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/Type$Struct$Field; public final fun typeSymbol (Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/Type$Symbol; public static synthetic fun typeSymbol$default (Lorg/partiql/ast/builder/AstBuilder;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/partiql/ast/Type$Symbol; public final fun typeTime (Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;)Lorg/partiql/ast/Type$Time; @@ -4398,21 +4336,15 @@ public final class org/partiql/ast/builder/DdlOpCreateIndexBuilder { public final class org/partiql/ast/builder/DdlOpCreateTableBuilder { public fun ()V - public fun (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;Lorg/partiql/ast/PartitionBy;Ljava/util/List;)V - public synthetic fun (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;Lorg/partiql/ast/PartitionBy;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;)V + public synthetic fun (Lorg/partiql/ast/Identifier;Lorg/partiql/ast/TableDefinition;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun build ()Lorg/partiql/ast/DdlOp$CreateTable; public final fun definition (Lorg/partiql/ast/TableDefinition;)Lorg/partiql/ast/builder/DdlOpCreateTableBuilder; public final fun getDefinition ()Lorg/partiql/ast/TableDefinition; public final fun getName ()Lorg/partiql/ast/Identifier; - public final fun getPartitionBy ()Lorg/partiql/ast/PartitionBy; - public final fun getTableProperties ()Ljava/util/List; public final fun name (Lorg/partiql/ast/Identifier;)Lorg/partiql/ast/builder/DdlOpCreateTableBuilder; - public final fun partitionBy (Lorg/partiql/ast/PartitionBy;)Lorg/partiql/ast/builder/DdlOpCreateTableBuilder; public final fun setDefinition (Lorg/partiql/ast/TableDefinition;)V public final fun setName (Lorg/partiql/ast/Identifier;)V - public final fun setPartitionBy (Lorg/partiql/ast/PartitionBy;)V - public final fun setTableProperties (Ljava/util/List;)V - public final fun tableProperties (Ljava/util/List;)Lorg/partiql/ast/builder/DdlOpCreateTableBuilder; } public final class org/partiql/ast/builder/DdlOpDropIndexBuilder { @@ -5480,16 +5412,6 @@ public final class org/partiql/ast/builder/OrderByBuilder { public final fun sorts (Ljava/util/List;)Lorg/partiql/ast/builder/OrderByBuilder; } -public final class org/partiql/ast/builder/PartitionByAttrListBuilder { - public fun ()V - public fun (Ljava/util/List;)V - public synthetic fun (Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun build ()Lorg/partiql/ast/PartitionBy$AttrList; - public final fun getList ()Ljava/util/List; - public final fun list (Ljava/util/List;)Lorg/partiql/ast/builder/PartitionByAttrListBuilder; - public final fun setList (Ljava/util/List;)V -} - public final class org/partiql/ast/builder/PathBuilder { public fun ()V public fun (Lorg/partiql/ast/Identifier$Symbol;Ljava/util/List;)V @@ -5949,22 +5871,16 @@ public final class org/partiql/ast/builder/StatementQueryBuilder { public final class org/partiql/ast/builder/TableDefinitionAttributeBuilder { public fun ()V - public fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/String;)V - public synthetic fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;)V + public synthetic fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun build ()Lorg/partiql/ast/TableDefinition$Attribute; - public final fun comment (Ljava/lang/String;)Lorg/partiql/ast/builder/TableDefinitionAttributeBuilder; public final fun constraints (Ljava/util/List;)Lorg/partiql/ast/builder/TableDefinitionAttributeBuilder; - public final fun getComment ()Ljava/lang/String; public final fun getConstraints ()Ljava/util/List; public final fun getName ()Lorg/partiql/ast/Identifier$Symbol; public final fun getType ()Lorg/partiql/ast/Type; - public final fun isOptional ()Ljava/lang/Boolean; - public final fun isOptional (Ljava/lang/Boolean;)Lorg/partiql/ast/builder/TableDefinitionAttributeBuilder; public final fun name (Lorg/partiql/ast/Identifier$Symbol;)Lorg/partiql/ast/builder/TableDefinitionAttributeBuilder; - public final fun setComment (Ljava/lang/String;)V public final fun setConstraints (Ljava/util/List;)V public final fun setName (Lorg/partiql/ast/Identifier$Symbol;)V - public final fun setOptional (Ljava/lang/Boolean;)V public final fun setType (Lorg/partiql/ast/Type;)V public final fun type (Lorg/partiql/ast/Type;)Lorg/partiql/ast/builder/TableDefinitionAttributeBuilder; } @@ -5982,19 +5898,6 @@ public final class org/partiql/ast/builder/TableDefinitionBuilder { public final fun setConstraints (Ljava/util/List;)V } -public final class org/partiql/ast/builder/TablePropertyBuilder { - public fun ()V - public fun (Ljava/lang/String;Lorg/partiql/value/PartiQLValue;)V - public synthetic fun (Ljava/lang/String;Lorg/partiql/value/PartiQLValue;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun build ()Lorg/partiql/ast/TableProperty; - public final fun getName ()Ljava/lang/String; - public final fun getValue ()Lorg/partiql/value/PartiQLValue; - public final fun name (Ljava/lang/String;)Lorg/partiql/ast/builder/TablePropertyBuilder; - public final fun setName (Ljava/lang/String;)V - public final fun setValue (Lorg/partiql/value/PartiQLValue;)V - public final fun value (Lorg/partiql/value/PartiQLValue;)Lorg/partiql/ast/builder/TablePropertyBuilder; -} - public final class org/partiql/ast/builder/TypeAnyBuilder { public fun ()V public final fun build ()Lorg/partiql/ast/Type$Any; @@ -6218,22 +6121,16 @@ public final class org/partiql/ast/builder/TypeStructBuilder { public final class org/partiql/ast/builder/TypeStructFieldBuilder { public fun ()V - public fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/String;)V - public synthetic fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;)V + public synthetic fun (Lorg/partiql/ast/Identifier$Symbol;Lorg/partiql/ast/Type;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun build ()Lorg/partiql/ast/Type$Struct$Field; - public final fun comment (Ljava/lang/String;)Lorg/partiql/ast/builder/TypeStructFieldBuilder; public final fun constraints (Ljava/util/List;)Lorg/partiql/ast/builder/TypeStructFieldBuilder; - public final fun getComment ()Ljava/lang/String; public final fun getConstraints ()Ljava/util/List; public final fun getName ()Lorg/partiql/ast/Identifier$Symbol; public final fun getType ()Lorg/partiql/ast/Type; - public final fun isOptional ()Ljava/lang/Boolean; - public final fun isOptional (Ljava/lang/Boolean;)Lorg/partiql/ast/builder/TypeStructFieldBuilder; public final fun name (Lorg/partiql/ast/Identifier$Symbol;)Lorg/partiql/ast/builder/TypeStructFieldBuilder; - public final fun setComment (Ljava/lang/String;)V public final fun setConstraints (Ljava/util/List;)V public final fun setName (Lorg/partiql/ast/Identifier$Symbol;)V - public final fun setOptional (Ljava/lang/Boolean;)V public final fun setType (Lorg/partiql/ast/Type;)V public final fun type (Lorg/partiql/ast/Type;)Lorg/partiql/ast/builder/TypeStructFieldBuilder; } @@ -6839,8 +6736,6 @@ public abstract class org/partiql/ast/util/AstRewriter : org/partiql/ast/visitor public fun visitOnConflictTargetSymbols (Lorg/partiql/ast/OnConflict$Target$Symbols;Ljava/lang/Object;)Lorg/partiql/ast/AstNode; public synthetic fun visitOrderBy (Lorg/partiql/ast/OrderBy;Ljava/lang/Object;)Ljava/lang/Object; public fun visitOrderBy (Lorg/partiql/ast/OrderBy;Ljava/lang/Object;)Lorg/partiql/ast/AstNode; - public synthetic fun visitPartitionByAttrList (Lorg/partiql/ast/PartitionBy$AttrList;Ljava/lang/Object;)Ljava/lang/Object; - public fun visitPartitionByAttrList (Lorg/partiql/ast/PartitionBy$AttrList;Ljava/lang/Object;)Lorg/partiql/ast/AstNode; public synthetic fun visitPath (Lorg/partiql/ast/Path;Ljava/lang/Object;)Ljava/lang/Object; public fun visitPath (Lorg/partiql/ast/Path;Ljava/lang/Object;)Lorg/partiql/ast/AstNode; public synthetic fun visitPathStepIndex (Lorg/partiql/ast/Path$Step$Index;Ljava/lang/Object;)Ljava/lang/Object; @@ -6915,8 +6810,6 @@ public abstract class org/partiql/ast/util/AstRewriter : org/partiql/ast/visitor public fun visitTableDefinition (Lorg/partiql/ast/TableDefinition;Ljava/lang/Object;)Lorg/partiql/ast/AstNode; public synthetic fun visitTableDefinitionAttribute (Lorg/partiql/ast/TableDefinition$Attribute;Ljava/lang/Object;)Ljava/lang/Object; public fun visitTableDefinitionAttribute (Lorg/partiql/ast/TableDefinition$Attribute;Ljava/lang/Object;)Lorg/partiql/ast/AstNode; - public synthetic fun visitTableProperty (Lorg/partiql/ast/TableProperty;Ljava/lang/Object;)Ljava/lang/Object; - public fun visitTableProperty (Lorg/partiql/ast/TableProperty;Ljava/lang/Object;)Lorg/partiql/ast/AstNode; public synthetic fun visitTypeAny (Lorg/partiql/ast/Type$Any;Ljava/lang/Object;)Ljava/lang/Object; public fun visitTypeAny (Lorg/partiql/ast/Type$Any;Ljava/lang/Object;)Lorg/partiql/ast/AstNode; public synthetic fun visitTypeArray (Lorg/partiql/ast/Type$Array;Ljava/lang/Object;)Ljava/lang/Object; @@ -7105,8 +6998,6 @@ public abstract class org/partiql/ast/visitor/AstBaseVisitor : org/partiql/ast/v public fun visitOnConflictTargetConstraint (Lorg/partiql/ast/OnConflict$Target$Constraint;Ljava/lang/Object;)Ljava/lang/Object; public fun visitOnConflictTargetSymbols (Lorg/partiql/ast/OnConflict$Target$Symbols;Ljava/lang/Object;)Ljava/lang/Object; public fun visitOrderBy (Lorg/partiql/ast/OrderBy;Ljava/lang/Object;)Ljava/lang/Object; - public fun visitPartitionBy (Lorg/partiql/ast/PartitionBy;Ljava/lang/Object;)Ljava/lang/Object; - public fun visitPartitionByAttrList (Lorg/partiql/ast/PartitionBy$AttrList;Ljava/lang/Object;)Ljava/lang/Object; public fun visitPath (Lorg/partiql/ast/Path;Ljava/lang/Object;)Ljava/lang/Object; public fun visitPathStep (Lorg/partiql/ast/Path$Step;Ljava/lang/Object;)Ljava/lang/Object; public fun visitPathStepIndex (Lorg/partiql/ast/Path$Step$Index;Ljava/lang/Object;)Ljava/lang/Object; @@ -7152,7 +7043,6 @@ public abstract class org/partiql/ast/visitor/AstBaseVisitor : org/partiql/ast/v public fun visitStatementQuery (Lorg/partiql/ast/Statement$Query;Ljava/lang/Object;)Ljava/lang/Object; public fun visitTableDefinition (Lorg/partiql/ast/TableDefinition;Ljava/lang/Object;)Ljava/lang/Object; public fun visitTableDefinitionAttribute (Lorg/partiql/ast/TableDefinition$Attribute;Ljava/lang/Object;)Ljava/lang/Object; - public fun visitTableProperty (Lorg/partiql/ast/TableProperty;Ljava/lang/Object;)Ljava/lang/Object; public fun visitType (Lorg/partiql/ast/Type;Ljava/lang/Object;)Ljava/lang/Object; public fun visitTypeAny (Lorg/partiql/ast/Type$Any;Ljava/lang/Object;)Ljava/lang/Object; public fun visitTypeArray (Lorg/partiql/ast/Type$Array;Ljava/lang/Object;)Ljava/lang/Object; @@ -7300,8 +7190,6 @@ public abstract interface class org/partiql/ast/visitor/AstVisitor { public abstract fun visitOnConflictTargetConstraint (Lorg/partiql/ast/OnConflict$Target$Constraint;Ljava/lang/Object;)Ljava/lang/Object; public abstract fun visitOnConflictTargetSymbols (Lorg/partiql/ast/OnConflict$Target$Symbols;Ljava/lang/Object;)Ljava/lang/Object; public abstract fun visitOrderBy (Lorg/partiql/ast/OrderBy;Ljava/lang/Object;)Ljava/lang/Object; - public abstract fun visitPartitionBy (Lorg/partiql/ast/PartitionBy;Ljava/lang/Object;)Ljava/lang/Object; - public abstract fun visitPartitionByAttrList (Lorg/partiql/ast/PartitionBy$AttrList;Ljava/lang/Object;)Ljava/lang/Object; public abstract fun visitPath (Lorg/partiql/ast/Path;Ljava/lang/Object;)Ljava/lang/Object; public abstract fun visitPathStep (Lorg/partiql/ast/Path$Step;Ljava/lang/Object;)Ljava/lang/Object; public abstract fun visitPathStepIndex (Lorg/partiql/ast/Path$Step$Index;Ljava/lang/Object;)Ljava/lang/Object; @@ -7347,7 +7235,6 @@ public abstract interface class org/partiql/ast/visitor/AstVisitor { public abstract fun visitStatementQuery (Lorg/partiql/ast/Statement$Query;Ljava/lang/Object;)Ljava/lang/Object; public abstract fun visitTableDefinition (Lorg/partiql/ast/TableDefinition;Ljava/lang/Object;)Ljava/lang/Object; public abstract fun visitTableDefinitionAttribute (Lorg/partiql/ast/TableDefinition$Attribute;Ljava/lang/Object;)Ljava/lang/Object; - public abstract fun visitTableProperty (Lorg/partiql/ast/TableProperty;Ljava/lang/Object;)Ljava/lang/Object; public abstract fun visitType (Lorg/partiql/ast/Type;Ljava/lang/Object;)Ljava/lang/Object; public abstract fun visitTypeAny (Lorg/partiql/ast/Type$Any;Ljava/lang/Object;)Ljava/lang/Object; public abstract fun visitTypeArray (Lorg/partiql/ast/Type$Array;Ljava/lang/Object;)Ljava/lang/Object; diff --git a/partiql-ast/src/main/kotlin/org/partiql/ast/helpers/ToLegacyAst.kt b/partiql-ast/src/main/kotlin/org/partiql/ast/helpers/ToLegacyAst.kt index cd25a2fdef..069882211c 100644 --- a/partiql-ast/src/main/kotlin/org/partiql/ast/helpers/ToLegacyAst.kt +++ b/partiql-ast/src/main/kotlin/org/partiql/ast/helpers/ToLegacyAst.kt @@ -138,12 +138,6 @@ private class AstTranslator(val metas: Map) : AstBaseVisi } val tableName = node.name.symbol val def = node.definition?.let { visitTableDefinition(it, ctx) } - if (node.partitionBy != null) { - error("The legacy AST does not support Partition BY in create Table") - } - if (node.tableProperties.isNotEmpty()) { - error("The legacy AST does not support TBLProperties in create Table") - } ddl(createTable(tableName, def), metas) } @@ -195,12 +189,6 @@ private class AstTranslator(val metas: Map) : AstBaseVisi val name = node.name.symbol val type = visitType(node.type, ctx) val constraints = node.constraints.translate(ctx) - if (node.isOptional) { - error("The legacy AST does not support optional field declaration") - } - if (node.comment != null) { - error("The legacy AST does not support comment clause") - } columnDeclaration(name, type, constraints, metas) } diff --git a/partiql-ast/src/main/resources/partiql_ast.ion b/partiql-ast/src/main/resources/partiql_ast.ion index 91368a6a0b..ee8f966c44 100644 --- a/partiql-ast/src/main/resources/partiql_ast.ion +++ b/partiql-ast/src/main/resources/partiql_ast.ion @@ -133,12 +133,6 @@ ddl_op::[ create_table::{ name: identifier, definition: optional::table_definition, - // This is an expression for backward compatibility - // For now, we support `PARTITION BY ( (, )* ))` - // But in the future, we might support additional partition expressions: - // such as `PARTITION BY RANGE(..)` - partition_by: optional::partition_by, - table_properties: list::[table_property], }, // CREATE INDEX [] ON ( [, ]...) @@ -239,8 +233,6 @@ type::[ // for struct subfield. But modeling this to be a list of constraints // to prevent future breaking changes. constraints: list::[constraint], - is_optional: bool, - comment: optional::string, } ], }, // STRUCT @@ -838,9 +830,6 @@ table_definition::{ name: '.identifier.symbol', type: '.type', constraints: list::[constraint], - // TODO: Consider to model this as a constraint? - is_optional: bool, - comment: optional::string, } ], } @@ -859,18 +848,6 @@ constraint::{ ], } -partition_by::[ - attr_list :: { - list: list::['.identifier.symbol'] - }, - // We can add other commonly support Partition Expression like `range` later -] - -table_property::{ - name: string, - value: '.value', -} - // SQL-99 Table 11 datetime_field::[ YEAR, // 0001-9999 diff --git a/partiql-ast/src/test/kotlin/org/partiql/ast/helpers/ToLegacyAstTest.kt b/partiql-ast/src/test/kotlin/org/partiql/ast/helpers/ToLegacyAstTest.kt index 8cfc7ae618..930a7dfe33 100644 --- a/partiql-ast/src/test/kotlin/org/partiql/ast/helpers/ToLegacyAstTest.kt +++ b/partiql-ast/src/test/kotlin/org/partiql/ast/helpers/ToLegacyAstTest.kt @@ -423,9 +423,7 @@ class ToLegacyAstTest { fields += org.partiql.ast.typeStructField( org.partiql.ast.identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), typeInt2(), - emptyList(), - false, - null + emptyList() ) } }, diff --git a/partiql-lang/src/main/kotlin/org/partiql/lang/syntax/impl/PartiQLPigVisitor.kt b/partiql-lang/src/main/kotlin/org/partiql/lang/syntax/impl/PartiQLPigVisitor.kt index 94fc442348..48c1b30351 100644 --- a/partiql-lang/src/main/kotlin/org/partiql/lang/syntax/impl/PartiQLPigVisitor.kt +++ b/partiql-lang/src/main/kotlin/org/partiql/lang/syntax/impl/PartiQLPigVisitor.kt @@ -259,7 +259,6 @@ internal class PartiQLPigVisitor( throw ParserException("PIG Parser does not support qualified name as table name", ErrorCode.PARSE_UNEXPECTED_TOKEN) } val def = ctx.tableDef()?.let { visitTableDef(it) } - ctx.tableExtension().map { visit(it) } createTable_(name, def, ctx.CREATE().getSourceMetaContainer()) } @@ -278,12 +277,6 @@ internal class PartiQLPigVisitor( val name = visitSymbolPrimitive(ctx.columnName().symbolPrimitive()).name.text val type = visit(ctx.type()) as PartiqlAst.Type val constrs = ctx.columnConstraint().map { visitColumnConstraint(it) } - if (ctx.OPTIONAL() != null) { - throw ParserException("PIG Parser does not support OPTIONAL Field", ErrorCode.PARSE_UNEXPECTED_TOKEN) - } - if (ctx.comment() != null) { - throw ParserException("PIG Parser does not support COMMENT Clause", ErrorCode.PARSE_UNEXPECTED_TOKEN) - } columnDeclaration(name, type, constrs) } @@ -301,12 +294,6 @@ internal class PartiQLPigVisitor( columnNull() } - override fun visitTableConstrDeclaration(ctx: PartiQLParser.TableConstrDeclarationContext) = throw ParserException("PIG Parser does not support tuple level constraint", ErrorCode.PARSE_UNEXPECTED_TOKEN) - - override fun visitTblExtensionPartition(ctx: PartiQLParser.TblExtensionPartitionContext) = throw ParserException("PIG Parser does not support PARTITION BY Clause", ErrorCode.PARSE_UNEXPECTED_TOKEN) - - override fun visitTblExtensionTblProperties(ctx: PartiQLParser.TblExtensionTblPropertiesContext) = throw ParserException("PIG Parser does not support TBLPROPERTIES Clause", ErrorCode.PARSE_UNEXPECTED_TOKEN) - /** * * EXECUTE diff --git a/partiql-lang/src/test/kotlin/org/partiql/lang/syntax/PartiQLParserDDLTest.kt b/partiql-lang/src/test/kotlin/org/partiql/lang/syntax/PartiQLParserDDLTest.kt index 2662034473..743348b69c 100644 --- a/partiql-lang/src/test/kotlin/org/partiql/lang/syntax/PartiQLParserDDLTest.kt +++ b/partiql-lang/src/test/kotlin/org/partiql/lang/syntax/PartiQLParserDDLTest.kt @@ -96,44 +96,6 @@ internal class PartiQLParserDDLTest : PartiQLParserTestBase() { code = ErrorCode.PARSE_UNEXPECTED_TOKEN, context = mapOf(), ), - ParserErrorTestCase( - description = "PIG Parser does not support OPTIONAL Attribute", - query = """ - CREATE TABLE tbl ( - a OPTIONAL INT2 - ) - """.trimIndent(), - code = ErrorCode.PARSE_UNEXPECTED_TOKEN, - context = mapOf(), - ), - ParserErrorTestCase( - description = "PIG Parser does not support COMMENT keyword", - query = """ - CREATE TABLE tbl ( - a INT2 COMMENT 'this is a comment' - ) - """.trimIndent(), - code = ErrorCode.PARSE_UNEXPECTED_TOKEN, - context = mapOf(), - ), - ParserErrorTestCase( - description = "PIG Parser does not support PARTITION BY keyword", - query = """ - CREATE TABLE tbl - PARTITION BY (a, b) - """.trimIndent(), - code = ErrorCode.PARSE_UNEXPECTED_TOKEN, - context = mapOf(), - ), - ParserErrorTestCase( - description = "PIG Parser does not support TBLPROPERTIES keyword", - query = """ - CREATE TABLE tbl - TBLPROPERTIES ('k1' = 'v1') - """.trimIndent(), - code = ErrorCode.PARSE_UNEXPECTED_TOKEN, - context = mapOf(), - ), // Putting those tests here are they are impacted by DDL implementation ParserErrorTestCase( diff --git a/partiql-lang/src/test/kotlin/org/partiql/lang/syntax/PartiQLParserMatchTest.kt b/partiql-lang/src/test/kotlin/org/partiql/lang/syntax/PartiQLParserMatchTest.kt index fcc1a10e27..d45c4a4fb1 100644 --- a/partiql-lang/src/test/kotlin/org/partiql/lang/syntax/PartiQLParserMatchTest.kt +++ b/partiql-lang/src/test/kotlin/org/partiql/lang/syntax/PartiQLParserMatchTest.kt @@ -1067,7 +1067,7 @@ class PartiQLParserMatchTest : PartiQLParserTestBase() { @Test fun prefilters() = assertExpression( - "SELECT u as banCandidate FROM g MATCH (p:Post Where p.isFlagged = true) <-[:createdPost]- (u:Usr WHERE u.isBanned = false AND u.karma < 20) -[:createdComment]->(c:\"Comment\" WHERE c.isFlagged = true) WHERE p.title LIKE '%considered harmful%'", + "SELECT u as banCandidate FROM g MATCH (p:Post Where p.isFlagged = true) <-[:createdPost]- (u:Usr WHERE u.isBanned = false AND u.karma < 20) -[:createdComment]->(c:Comment WHERE c.isFlagged = true) WHERE p.title LIKE '%considered harmful%'", ) { PartiqlAst.build { select( diff --git a/partiql-parser/src/main/antlr/PartiQLParser.g4 b/partiql-parser/src/main/antlr/PartiQLParser.g4 index 54be03c23c..0ed2c01e32 100644 --- a/partiql-parser/src/main/antlr/PartiQLParser.g4 +++ b/partiql-parser/src/main/antlr/PartiQLParser.g4 @@ -79,7 +79,6 @@ qualifiedName : (qualifier+=symbolPrimitive PERIOD)* name=symbolPrimitive; tableName : symbolPrimitive; columnName : symbolPrimitive; constraintName : symbolPrimitive; -comment : COMMENT LITERAL_STRING; ddl : createCommand @@ -87,7 +86,7 @@ ddl ; createCommand - : CREATE TABLE qualifiedName ( PAREN_LEFT tableDef PAREN_RIGHT )? tableExtension* # CreateTable + : CREATE TABLE qualifiedName ( PAREN_LEFT tableDef PAREN_RIGHT )? # CreateTable | CREATE INDEX ON symbolPrimitive PAREN_LEFT pathSimple ( COMMA pathSimple )* PAREN_RIGHT # CreateIndex ; @@ -101,7 +100,7 @@ tableDef ; tableDefPart - : columnName OPTIONAL? type columnConstraint* comment? # ColumnDeclaration + : columnName type columnConstraint* # ColumnDeclaration | ( CONSTRAINT constraintName )? tableConstraintDef # TableConstrDeclaration ; @@ -139,20 +138,6 @@ uniqueConstraintDef // but we at least can eliminate SFW query here. searchCondition : exprOr; -// SQL/HIVE DDL Extension, Support additional table metadatas such as partition by, tblProperties, etc. -tableExtension - : PARTITION BY partitionBy # TblExtensionPartition - | TBLPROPERTIES PAREN_LEFT keyValuePair (COMMA keyValuePair)* PAREN_RIGHT # TblExtensionTblProperties - ; - -// Limiting the scope to only allow String as valid value for now -keyValuePair : key=LITERAL_STRING EQ value=LITERAL_STRING; - -// For now: just support a list of column name -// In the future, we might support common partition expression such as Hash(), Range(), etc. -partitionBy - : PAREN_LEFT columnName (COMMA columnName)* PAREN_RIGHT #PartitionColList - ; /** * * DATA MANIPULATION LANGUAGE (DML) @@ -897,5 +882,5 @@ type ; structField - : columnName OPTIONAL? COLON type columnConstraint* comment? + : columnName COLON type columnConstraint* ; diff --git a/partiql-parser/src/main/antlr/PartiQLTokens.g4 b/partiql-parser/src/main/antlr/PartiQLTokens.g4 index 20e2d94255..05feb24138 100644 --- a/partiql-parser/src/main/antlr/PartiQLTokens.g4 +++ b/partiql-parser/src/main/antlr/PartiQLTokens.g4 @@ -59,7 +59,6 @@ COALESCE: 'COALESCE'; COLLATE: 'COLLATE'; COLLATION: 'COLLATION'; COLUMN: 'COLUMN'; -COMMENT: 'COMMENT'; COMMIT: 'COMMIT'; CONNECT: 'CONNECT'; CONNECTION: 'CONNECTION'; @@ -176,7 +175,6 @@ ON: 'ON'; ONLY: 'ONLY'; OPEN: 'OPEN'; OPTION: 'OPTION'; -OPTIONAL: 'OPTIONAL'; OR: 'OR'; ORDER: 'ORDER'; OUTER: 'OUTER'; @@ -289,7 +287,6 @@ MODIFIED: 'MODIFIED'; NEW: 'NEW'; OLD: 'OLD'; NOTHING: 'NOTHING'; -TBLPROPERTIES: 'TBLPROPERTIES'; /** * diff --git a/partiql-parser/src/main/kotlin/org/partiql/parser/internal/PartiQLParserDefault.kt b/partiql-parser/src/main/kotlin/org/partiql/parser/internal/PartiQLParserDefault.kt index ab893442dd..7eefd2abe5 100644 --- a/partiql-parser/src/main/kotlin/org/partiql/parser/internal/PartiQLParserDefault.kt +++ b/partiql-parser/src/main/kotlin/org/partiql/parser/internal/PartiQLParserDefault.kt @@ -44,7 +44,6 @@ import org.partiql.ast.GroupBy import org.partiql.ast.Identifier import org.partiql.ast.Let import org.partiql.ast.OnConflict -import org.partiql.ast.PartitionBy import org.partiql.ast.Path import org.partiql.ast.Returning import org.partiql.ast.Select @@ -141,7 +140,6 @@ import org.partiql.ast.onConflictActionDoUpdate import org.partiql.ast.onConflictTargetConstraint import org.partiql.ast.onConflictTargetSymbols import org.partiql.ast.orderBy -import org.partiql.ast.partitionByAttrList import org.partiql.ast.path import org.partiql.ast.pathStepIndex import org.partiql.ast.pathStepSymbol @@ -179,7 +177,6 @@ import org.partiql.ast.statementExplainTargetDomain import org.partiql.ast.statementQuery import org.partiql.ast.tableDefinition import org.partiql.ast.tableDefinitionAttribute -import org.partiql.ast.tableProperty import org.partiql.ast.typeAny import org.partiql.ast.typeArray import org.partiql.ast.typeBag @@ -621,26 +618,7 @@ internal class PartiQLParserDefault : PartiQLParser { override fun visitCreateTable(ctx: GeneratedParser.CreateTableContext) = translate(ctx) { val table = visitQualifiedName(ctx.qualifiedName()) val definition = ctx.tableDef()?.let { visitTableDef(it) } - val partitionBy = ctx - .tableExtension() - .filterIsInstance() - .let { - if (it.size > 1) throw error(ctx, "Expect one PARTITION BY clause.") - it.firstOrNull()?.let { visitTblExtensionPartition(it) } - } - val tblProperties = ctx - .tableExtension() - .filterIsInstance() - .let { - if (it.size > 1) throw error(ctx, "Expect one TBLPROPERTIES clause.") - val tblPropertiesCtx = it.firstOrNull() - tblPropertiesCtx?.keyValuePair()?.map { - val key = it.key.getStringValue() - val value = it.value.getStringValue() - tableProperty(key, stringValue(value)) - } ?: emptyList() - } - ddlOpCreateTable(table, definition, partitionBy, tblProperties) + ddlOpCreateTable(table, definition) } override fun visitCreateIndex(ctx: GeneratedParser.CreateIndexContext) = translate(ctx) { @@ -670,12 +648,7 @@ internal class PartiQLParserDefault : PartiQLParser { isValidTypeDeclarationOrThrow(it, ctx.type()) } val constraints = ctx.columnConstraint().map { visitColumnConstraint(it) } - val optional = when (ctx.OPTIONAL()) { - null -> false - else -> true - } - val comment = ctx.comment()?.LITERAL_STRING()?.getStringValue() - tableDefinitionAttribute(name, type, constraints, optional, comment) + tableDefinitionAttribute(name, type, constraints) } /** @@ -745,13 +718,6 @@ internal class PartiQLParserDefault : PartiQLParser { constraint(identifier, body) } - override fun visitTblExtensionPartition(ctx: GeneratedParser.TblExtensionPartitionContext) = - ctx.partitionBy().accept(this) as PartitionBy - - override fun visitPartitionColList(ctx: GeneratedParser.PartitionColListContext) = translate(ctx) { - partitionByAttrList(ctx.columnName().map { visitSymbolPrimitive(it.symbolPrimitive()) }) - } - /** * * EXECUTE @@ -2262,13 +2228,8 @@ internal class PartiQLParserDefault : PartiQLParser { else -> throw error(it, "Only NULL Constraint and NOT NULL Constraint are allowed in Struct field") } } - val optional = when (structFieldCtx.OPTIONAL()) { - null -> false - else -> true - } - val comment = structFieldCtx.comment()?.LITERAL_STRING()?.getStringValue() - typeStructField(name, type, constraints, optional, comment) + typeStructField(name, type, constraints) } typeStruct(fields) } diff --git a/partiql-parser/src/test/kotlin/org/partiql/parser/internal/PartiQLParserDDLTests.kt b/partiql-parser/src/test/kotlin/org/partiql/parser/internal/PartiQLParserDDLTests.kt index 48709c8005..64dba85aff 100644 --- a/partiql-parser/src/test/kotlin/org/partiql/parser/internal/PartiQLParserDDLTests.kt +++ b/partiql-parser/src/test/kotlin/org/partiql/parser/internal/PartiQLParserDDLTests.kt @@ -10,7 +10,6 @@ import org.partiql.ast.Constraint import org.partiql.ast.DdlOp import org.partiql.ast.Expr import org.partiql.ast.Identifier -import org.partiql.ast.PartitionBy import org.partiql.ast.Type import org.partiql.ast.constraint import org.partiql.ast.constraintDefinitionCheck @@ -26,11 +25,9 @@ import org.partiql.ast.identifierSymbol import org.partiql.ast.statementDDL import org.partiql.ast.tableDefinition import org.partiql.ast.tableDefinitionAttribute -import org.partiql.ast.tableProperty import org.partiql.parser.PartiQLParserException import org.partiql.value.PartiQLValueExperimental import org.partiql.value.int32Value -import org.partiql.value.stringValue import java.util.stream.Stream import kotlin.test.assertEquals @@ -70,8 +67,6 @@ class PartiQLParserDDLTests { ddlOpCreateTable( identifierSymbol("foo", Identifier.CaseSensitivity.INSENSITIVE), null, - null, - emptyList() ) ), // Support Case Sensitive identifier as table name @@ -82,9 +77,7 @@ class PartiQLParserDDLTests { "CREATE TABLE \"foo\"", ddlOpCreateTable( identifierSymbol("foo", Identifier.CaseSensitivity.SENSITIVE), - null, - null, - emptyList() + null ) ), SuccessTestCase( @@ -98,9 +91,7 @@ class PartiQLParserDDLTests { identifierSymbol("foo", Identifier.CaseSensitivity.INSENSITIVE), ) ), - null, - null, - emptyList() + null ) ), SuccessTestCase( @@ -114,9 +105,7 @@ class PartiQLParserDDLTests { identifierSymbol("foo", Identifier.CaseSensitivity.INSENSITIVE), ) ), - null, - null, - emptyList() + null ) ), @@ -138,14 +127,10 @@ class PartiQLParserDDLTests { identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), Type.Int2(), listOf(constraint(null, constraintDefinitionNotNull())), - false, - null ) ), emptyList() - ), - null, - emptyList() + ) ) ), @@ -164,14 +149,10 @@ class PartiQLParserDDLTests { identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), Type.Int2(), listOf(constraint(null, constraintDefinitionUnique(null, false))), - false, - null ) ), emptyList() ), - null, - emptyList() ) ), @@ -190,14 +171,10 @@ class PartiQLParserDDLTests { identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), Type.Int2(), listOf(constraint(null, constraintDefinitionUnique(null, true))), - false, - null ) ), emptyList() ), - null, - emptyList() ) ), @@ -227,14 +204,10 @@ class PartiQLParserDDLTests { ) ) ), - false, - null ) ), emptyList() ), - null, - emptyList() ) ), @@ -262,8 +235,6 @@ class PartiQLParserDDLTests { ) ) ), - null, - emptyList() ) ), @@ -291,8 +262,6 @@ class PartiQLParserDDLTests { ) ) ), - null, - emptyList() ) ), @@ -320,8 +289,6 @@ class PartiQLParserDDLTests { ) ) ), - null, - emptyList() ) ), @@ -340,14 +307,10 @@ class PartiQLParserDDLTests { identifierSymbol("a", Identifier.CaseSensitivity.SENSITIVE), Type.Int2(), emptyList(), - false, - null ) ), emptyList() ), - null, - emptyList() ) ), @@ -372,28 +335,20 @@ class PartiQLParserDDLTests { Type.Struct.Field( identifierSymbol("b", Identifier.CaseSensitivity.INSENSITIVE), Type.Int2(), - emptyList(), - false, - null + emptyList() ), Type.Struct.Field( identifierSymbol("c", Identifier.CaseSensitivity.INSENSITIVE), Type.Int2(), - listOf(Constraint(null, Constraint.Definition.NotNull())), - false, - null + listOf(Constraint(null, Constraint.Definition.NotNull())) ) ) ), emptyList(), - false, - null ) ), emptyList() ), - null, - emptyList() ) ), @@ -422,34 +377,24 @@ class PartiQLParserDDLTests { Type.Struct.Field( identifierSymbol("c", Identifier.CaseSensitivity.INSENSITIVE), Type.Int2(), - emptyList(), - false, - null + emptyList() ), ) ), - emptyList(), - false, - null + emptyList() ), Type.Struct.Field( identifierSymbol("d", Identifier.CaseSensitivity.INSENSITIVE), Type.Array(Type.Int2()), - emptyList(), - false, - null + emptyList() ) ) ), emptyList(), - false, - null ) ), emptyList() ), - null, - emptyList() ) ), @@ -470,14 +415,10 @@ class PartiQLParserDDLTests { emptyList() ), emptyList(), - false, - null ) ), emptyList() ), - null, - emptyList() ) ), @@ -496,14 +437,10 @@ class PartiQLParserDDLTests { identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), Type.Array(Type.Int2()), emptyList(), - false, - null ) ), emptyList() ), - null, - emptyList() ) ), SuccessTestCase( @@ -525,22 +462,16 @@ class PartiQLParserDDLTests { Type.Struct.Field( identifierSymbol("b", Identifier.CaseSensitivity.INSENSITIVE), Type.Int2(), - emptyList(), - false, - null + emptyList() ), ) ), ), emptyList(), - false, - null ) ), emptyList() ), - null, - emptyList() ) ), SuccessTestCase( @@ -562,22 +493,16 @@ class PartiQLParserDDLTests { Type.Struct.Field( identifierSymbol("b", Identifier.CaseSensitivity.INSENSITIVE), Type.Int2(), - emptyList(), - false, - null + emptyList() ), ) ), ), emptyList(), - false, - null ) ), emptyList() ), - null, - emptyList() ) ), @@ -596,313 +521,10 @@ class PartiQLParserDDLTests { identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), Type.Array(null), emptyList(), - false, - null - ) - ), - emptyList() - ), - null, - emptyList() - ) - ), - - // - // Optional keyword - // - SuccessTestCase( - "CREATE TABLE with top level attribute optional", - """ - CREATE TABLE tbl ( - a OPTIONAL INT2 - ) - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - tableDefinition( - listOf( - tableDefinitionAttribute( - identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), - Type.Int2(), - emptyList(), - true, - null - ) - ), - emptyList() - ), - null, - emptyList() - ) - ), - - SuccessTestCase( - "CREATE TABLE with struct optional field", - """ - CREATE TABLE tbl ( - a STRUCT - ) - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - tableDefinition( - listOf( - tableDefinitionAttribute( - identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), - Type.Struct( - listOf( - Type.Struct.Field( - identifierSymbol("b", Identifier.CaseSensitivity.INSENSITIVE), - Type.Int2(), - emptyList(), - true, - null - ) - ) - ), - emptyList(), - false, - null - ) - ), - emptyList() - ), - null, - emptyList() - ) - ), - - SuccessTestCase( - "CREATE TABLE with optional struct which has optional field", - """ - CREATE TABLE tbl ( - a OPTIONAL STRUCT - ) - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - tableDefinition( - listOf( - tableDefinitionAttribute( - identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), - Type.Struct( - listOf( - Type.Struct.Field( - identifierSymbol("b", Identifier.CaseSensitivity.INSENSITIVE), - Type.Int2(), - emptyList(), - true, - null - ) - ) - ), - emptyList(), - true, - null - ) - ), - emptyList() - ), - null, - emptyList() - ) - ), - - // COMMENT keyword - SuccessTestCase( - "CREATE TABLE with comment on top level attribute ", - """ - CREATE TABLE tbl ( - a INT2 COMMENT 'attribute a' - ) - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - tableDefinition( - listOf( - tableDefinitionAttribute( - identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), - Type.Int2(), - emptyList(), - false, - "attribute a" - ) - ), - emptyList() - ), - null, - emptyList() - ) - ), - - SuccessTestCase( - "CREATE TABLE with comment on struct field", - """ - CREATE TABLE tbl ( - a STRUCT - ) - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - tableDefinition( - listOf( - tableDefinitionAttribute( - identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), - Type.Struct( - listOf( - Type.Struct.Field( - identifierSymbol("b", Identifier.CaseSensitivity.INSENSITIVE), - Type.Int2(), - emptyList(), - false, - "comment on struct field" - ) - ) - ), - emptyList(), - false, - null ) ), emptyList() ), - null, - emptyList() - ) - ), - - SuccessTestCase( - "CREATE TABLE with comment on struct which has comment on field", - """ - CREATE TABLE tbl ( - a STRUCT COMMENT 'comment on top level' - ) - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - tableDefinition( - listOf( - tableDefinitionAttribute( - identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), - Type.Struct( - listOf( - Type.Struct.Field( - identifierSymbol("b", Identifier.CaseSensitivity.INSENSITIVE), - Type.Int2(), - emptyList(), - false, - "comment on inner level" - ) - ) - ), - emptyList(), - false, - "comment on top level" - ) - ), - emptyList() - ), - null, - emptyList() - ) - ), - - // Partition BY - SuccessTestCase( - "CREATE TABLE with Partition by single attribute", - """ - CREATE TABLE tbl - PARTITION BY (a) - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - null, - PartitionBy.AttrList( - listOf( - identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), - ) - ), - emptyList() - ) - ), - - SuccessTestCase( - "CREATE TABLE with Partition by multiple attribute", - """ - CREATE TABLE tbl - PARTITION BY (a, b) - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - null, - PartitionBy.AttrList( - listOf( - identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE), - identifierSymbol("b", Identifier.CaseSensitivity.INSENSITIVE), - ) - ), - emptyList() - ) - ), - - // Table Properties - SuccessTestCase( - "CREATE TABLE with TBLPROPERTIES single property", - """ - CREATE TABLE tbl - TBLPROPERTIES ('k1' = 'v1') - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - null, - null, - listOf(tableProperty("k1", stringValue("v1"))) - ) - ), - - SuccessTestCase( - "CREATE TABLE with TBLPROPERTIES preserve case sensitivity", - """ - CREATE TABLE tbl - TBLPROPERTIES ('K1k' = 'V1v') - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - null, - null, - listOf(tableProperty("K1k", stringValue("V1v"))) - ) - ), - - SuccessTestCase( - "CREATE TABLE with TBLPROPERTIES multiple properties", - """ - CREATE TABLE tbl - TBLPROPERTIES ('k1' = 'v1', 'k2' = 'v2') - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - null, - null, - listOf( - tableProperty("k1", stringValue("v1")), - tableProperty("k2", stringValue("v2")) - ) - ) - ), - - SuccessTestCase( - "CREATE TABLE with TBLPROPERTIES and PARTITION BY", - """ - CREATE TABLE tbl - PARTITION BY (a) - TBLPROPERTIES ('k1' = 'v1') - """.trimIndent(), - ddlOpCreateTable( - identifierSymbol("tbl", Identifier.CaseSensitivity.INSENSITIVE), - null, - PartitionBy.AttrList(listOf(identifierSymbol("a", Identifier.CaseSensitivity.INSENSITIVE),),), - listOf(tableProperty("k1", stringValue("v1")),) ) ), ) @@ -997,90 +619,6 @@ class PartiQLParserDDLTests { ) """.trimIndent() ), - ErrorTestCase( - "Multiple Partition by not allowed", - """ - CREATE TABLE TBL - PARTITION BY (a) - PARTITION BY (b) - """.trimIndent() - ), - ErrorTestCase( - "Empty Partition by not allowed", - """ - CREATE TABLE TBL - PARTITION BY () - """.trimIndent() - ), - - ErrorTestCase( - "Multiple TBLPROPERTIES not allowed", - """ - CREATE TABLE TBL - TBLPROPERTIES('k1' = 'v1') - TBLPROPERTIES('k2' = 'v2') - """.trimIndent() - ), - - ErrorTestCase( - "Empty TBLPROPERTIES not allowed", - """ - CREATE TABLE TBL - TBLPROPERTIES() - """.trimIndent() - ), - - ErrorTestCase( - "TBLPROPERTIES only allowed String value", - """ - CREATE TABLE TBL - TBLPROPERTIES('k1' = 1) - """.trimIndent() - ), - - ErrorTestCase( - "TBLPROPERTIES only allowed String key", - """ - CREATE TABLE TBL - TBLPROPERTIES(1 = '1') - """.trimIndent() - ), - - ErrorTestCase( - "OPTIONAL needs to follow attribute name", - """ - CREATE TABLE TBL ( - a INT2 OPTIONAL - ) - """.trimIndent() - ), - - ErrorTestCase( - "Multiple Optional not allowed", - """ - CREATE TABLE TBL ( - a OPTIONAL OPTIONAL INT2 - ) - """.trimIndent() - ), - - ErrorTestCase( - "Multiple COMMENT not allowed", - """ - CREATE TABLE TBL ( - a INT2 COMMENT 'comment1' COMMENT 'comment2' - ) - """.trimIndent() - ), - - ErrorTestCase( - "Inline comment needs to appear last", - """ - CREATE TABLE TBL ( - a INT2 COMMENT 'comment1' NOT NULL - ) - """.trimIndent() - ), // TODO: Move this to another place as part of parser test porting process ErrorTestCase( diff --git a/test/partiql-tests b/test/partiql-tests index 26ab08ec49..be88ae732b 160000 --- a/test/partiql-tests +++ b/test/partiql-tests @@ -1 +1 @@ -Subproject commit 26ab08ec49b889550ecca4878e2a338a712dcf35 +Subproject commit be88ae732bec0388c88acab108a392f586094fc7