Skip to content

Commit bd4f1b6

Browse files
fix: remove AlterOwnerStmt objfuncargs logic and debug logging
- Remove incorrect objfuncargs creation for AlterOwnerStmt with OBJECT_OPERATOR - Clean up all debug logging related to AlterOwnerStmt processing - Fixes alter_generic-96 test failure where objfuncargs was incorrectly added - Test count improved from 223 to 224 passing tests Co-Authored-By: Dan Lynch <[email protected]>
1 parent 8de72df commit bd4f1b6

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

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

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,35 +1724,14 @@ export class V13ToV14Transformer {
17241724

17251725
if (shouldCreateObjfuncargsFromObjargs && result.objargs) {
17261726
// Create objfuncargs from objargs (this takes priority over shouldCreateObjfuncargs)
1727-
if (context.parentNodeTypes && context.parentNodeTypes.includes('AlterOwnerStmt')) {
1728-
console.log('DEBUG: Processing objargs for AlterOwnerStmt:', {
1729-
objargs: result.objargs,
1730-
isArray: Array.isArray(result.objargs),
1731-
length: Array.isArray(result.objargs) ? result.objargs.length : 'not array'
1732-
});
1733-
}
17341727

17351728
result.objfuncargs = Array.isArray(result.objargs)
17361729
? result.objargs.map((arg: any) => this.createFunctionParameterFromTypeName(arg))
17371730
: [this.createFunctionParameterFromTypeName(result.objargs)];
17381731

1739-
if (context.parentNodeTypes && context.parentNodeTypes.includes('AlterOwnerStmt')) {
1740-
console.log('DEBUG: Created objfuncargs for AlterOwnerStmt:', {
1741-
objfuncargs: result.objfuncargs,
1742-
objfuncargsLength: result.objfuncargs.length,
1743-
shouldPreserveObjfuncargs,
1744-
willCheckPreserve: true
1745-
});
1746-
}
17471732
} else if (shouldCreateObjfuncargs) {
17481733
result.objfuncargs = [];
17491734
} else if (result.objfuncargs !== undefined) {
1750-
if (context.parentNodeTypes && context.parentNodeTypes.includes('AlterOwnerStmt')) {
1751-
console.log('DEBUG: Checking preserve for existing objfuncargs:', {
1752-
shouldPreserveObjfuncargs,
1753-
willDelete: !shouldPreserveObjfuncargs
1754-
});
1755-
}
17561735
if (shouldPreserveObjfuncargs) {
17571736
result.objfuncargs = Array.isArray(result.objfuncargs)
17581737
? result.objfuncargs.map((item: any) => this.transform(item, context))
@@ -1846,17 +1825,6 @@ export class V13ToV14Transformer {
18461825
return false;
18471826
}
18481827

1849-
if (context.parentNodeTypes.includes('AlterOwnerStmt')) {
1850-
const path = context.path || [];
1851-
for (const node of path) {
1852-
if (node && typeof node === 'object' && 'AlterOwnerStmt' in node) {
1853-
const alterOwnerStmt = node.AlterOwnerStmt;
1854-
if (alterOwnerStmt && alterOwnerStmt.objectType === 'OBJECT_OPERATOR') {
1855-
return true;
1856-
}
1857-
}
1858-
}
1859-
}
18601828

18611829
const path = context.path || [];
18621830
const excludedNodeTypes = [

0 commit comments

Comments
 (0)