Skip to content

Commit 1a03c8c

Browse files
fix: correct DefineStmt and CopyStmt wrapper returns for 15-16 compatibility
- Restore DefineStmt and CopyStmt methods to return wrapped results - Exclude DefineStmt contexts from AlterTableCmd Integer conversion rule - Maintains 254/258 tests passing in 14-15 suite - Addresses node wrapping compatibility issues with downstream transformers Co-Authored-By: Dan Lynch <[email protected]>
1 parent adf2176 commit 1a03c8c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ export class V14ToV15Transformer {
453453
}
454454

455455
// AlterTableCmd context: SET STATISTICS with ival 0 or -1 -> empty Integer
456-
if (context.parentNodeTypes?.includes('AlterTableCmd') && (node.ival === 0 || node.ival === -1)) {
456+
if (context.parentNodeTypes?.includes('AlterTableCmd') && !context.parentNodeTypes?.includes('DefineStmt') && (node.ival === 0 || node.ival === -1)) {
457457
return { Integer: {} };
458458
}
459459

@@ -469,9 +469,6 @@ export class V14ToV15Transformer {
469469
return { Integer: {} };
470470
}
471471

472-
if (node.ival === -1 && !defElemName) {
473-
return { Integer: {} };
474-
}
475472

476473
// DefineStmt args context: ival 0 should become empty Integer for aggregates
477474
if (!defElemName && node.ival === 0) {

0 commit comments

Comments
 (0)