Skip to content

Conversation

@cvng
Copy link
Contributor

@cvng cvng commented Dec 13, 2023

What kind of change does this PR introduce?

feat: support DefineStmt (aggregate): create aggregate ...

What is the current behavior?

Parser panics

What is the new behavior?

pg_query_root: Some( DefineStmt( DefineStmt { kind: ObjectAggregate, oldstyle: false, defnames: [ Node { node: Some( String( String { sval: "percentile_disc", }, ), ), }, ], args: [ Node { node: Some( List( List { items: [ Node { node: Some( FunctionParameter( FunctionParameter { name: "", arg_type: Some( TypeName { names: [ Node { node: Some( String( String { sval: "float8", }, ), ), }, ], type_oid: 0, setof: false, pct_type: false, typmods: [], typemod: -1, array_bounds: [], location: 45, }, ), mode: FuncParamDefault, defexpr: None, }, ), ), }, Node { node: Some( FunctionParameter( FunctionParameter { name: "", arg_type: Some( TypeName { names: [ Node { node: Some( String( String { sval: "anyelement", // appears once }, ), ), }, ], type_oid: 0, setof: false, pct_type: false, typmods: [], typemod: -1, array_bounds: [], location: 61, }, ), mode: FuncParamDefault, defexpr: None, }, ), ), }, ], }, ), ), }, Node { node: Some( Integer( Integer { ival: 1, }, ), ), }, ], definition: [ Node { node: Some( DefElem( DefElem { defnamespace: "", defname: "sfunc", arg: Some( Node { node: Some( TypeName( TypeName { names: [ Node { node: Some( String( String { sval: "ordered_set_transition", }, ), ), }, ], type_oid: 0, setof: false, pct_type: false, typmods: [], typemod: -1, array_bounds: [], location: 99, }, ), ), }, ), defaction: DefelemUnspec, location: 91, }, ), ), }, Node { node: Some( DefElem( DefElem { defnamespace: "", defname: "stype", arg: Some( Node { node: Some( TypeName( TypeName { names: [ Node { node: Some( String( String { sval: "internal", }, ), ), }, ], type_oid: 0, setof: false, pct_type: false, typmods: [], typemod: -1, array_bounds: [], location: 147, }, ), ), }, ), defaction: DefelemUnspec, location: 139, }, ), ), }, Node { node: Some( DefElem( DefElem { defnamespace: "", defname: "finalfunc", arg: Some( Node { node: Some( TypeName( TypeName { names: [ Node { node: Some( String( String { sval: "percentile_disc_final", }, ), ), }, ], type_oid: 0, setof: false, pct_type: false, typmods: [], typemod: -1, array_bounds: [], location: 185, }, ), ), }, ), defaction: DefelemUnspec, location: 173, }, ), ), }, Node { node: Some( DefElem( DefElem { defnamespace: "", defname: "finalfunc_extra", arg: None, defaction: DefelemUnspec, location: 224, }, ), ), }, ], if_not_exists: false, replace: true, }, ), )

Additional context

Add any other context or screenshots.

@cvng cvng force-pushed the create-aggr branch 3 times, most recently from 8e9043a to 8648397 Compare December 13, 2023 17:02
@psteinroe
Copy link
Collaborator

included in #72 - lmk if we can close this @cvng

@cvng
Copy link
Contributor Author

cvng commented Dec 17, 2023

included in #72

@cvng cvng closed this Dec 17, 2023
@cvng cvng deleted the create-aggr branch December 17, 2023 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants