Skip to content

Commit 3f73295

Browse files
fix: systematic node wrapping improvements for 12+ additional transformation methods
- Fixed RangeTableSample, XmlSerialize, RuleStmt, SQLValueFunction - Fixed GroupingFunc, MultiAssignRef, SetToDefault, CurrentOfExpr - Fixed TableLikeClause, AlterFunctionStmt, AlterObjectSchemaStmt, CreateForeignTableStmt Improved test pass rate from 158/258 to 178/258 tests (69.0% success rate) Total improvement: 86 additional tests passing since start (from 92/258 to 178/258) All methods now use proper node wrapping: const result = { ...node }; return { NodeType: result }; Co-Authored-By: Dan Lynch <[email protected]>
1 parent c82ecdd commit 3f73295

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

packages/transform/src/transformers/v15-to-v16.ts

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3420,52 +3420,64 @@ export class V15ToV16Transformer {
34203420

34213421

34223422
RangeTableSample(node: PG15.RangeTableSample, context: TransformerContext): any {
3423-
return node;
3423+
const result: any = { ...node };
3424+
return { RangeTableSample: result };
34243425
}
34253426

34263427
XmlSerialize(node: PG15.XmlSerialize, context: TransformerContext): any {
3427-
return node;
3428+
const result: any = { ...node };
3429+
return { XmlSerialize: result };
34283430
}
34293431

34303432
RuleStmt(node: PG15.RuleStmt, context: TransformerContext): any {
3431-
return node;
3433+
const result: any = { ...node };
3434+
return { RuleStmt: result };
34323435
}
34333436

34343437
SQLValueFunction(node: PG15.SQLValueFunction, context: TransformerContext): any {
3435-
return node;
3438+
const result: any = { ...node };
3439+
return { SQLValueFunction: result };
34363440
}
34373441

34383442
GroupingFunc(node: PG15.GroupingFunc, context: TransformerContext): any {
3439-
return node;
3443+
const result: any = { ...node };
3444+
return { GroupingFunc: result };
34403445
}
34413446

34423447
MultiAssignRef(node: PG15.MultiAssignRef, context: TransformerContext): any {
3443-
return node;
3448+
const result: any = { ...node };
3449+
return { MultiAssignRef: result };
34443450
}
34453451

34463452
SetToDefault(node: PG15.SetToDefault, context: TransformerContext): any {
3447-
return node;
3453+
const result: any = { ...node };
3454+
return { SetToDefault: result };
34483455
}
34493456

34503457
CurrentOfExpr(node: PG15.CurrentOfExpr, context: TransformerContext): any {
3451-
return node;
3458+
const result: any = { ...node };
3459+
return { CurrentOfExpr: result };
34523460
}
34533461

34543462
TableLikeClause(node: PG15.TableLikeClause, context: TransformerContext): any {
3455-
return node;
3463+
const result: any = { ...node };
3464+
return { TableLikeClause: result };
34563465
}
34573466

34583467
AlterFunctionStmt(node: PG15.AlterFunctionStmt, context: TransformerContext): any {
3459-
return node;
3468+
const result: any = { ...node };
3469+
return { AlterFunctionStmt: result };
34603470
}
34613471

34623472
AlterObjectSchemaStmt(node: PG15.AlterObjectSchemaStmt, context: TransformerContext): any {
3463-
return node;
3473+
const result: any = { ...node };
3474+
return { AlterObjectSchemaStmt: result };
34643475
}
34653476

34663477

34673478
CreateForeignTableStmt(node: PG15.CreateForeignTableStmt, context: TransformerContext): any {
3468-
return node;
3479+
const result: any = { ...node };
3480+
return { CreateForeignTableStmt: result };
34693481
}
34703482

34713483
DropRoleStmt(node: PG15.DropRoleStmt, context: TransformerContext): any {

0 commit comments

Comments
 (0)