File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -1568,9 +1568,9 @@ export class RealVariable extends Variable {
15681568
15691569/*
15701570 * Some constants from source code.
1571- * Using them in such way is quite safe, because they haven't
1572- * changed for many years (and I do not think will be changed
1573- * in near future).
1571+ *
1572+ * Using them in such way is quite safe, because they haven't changed for many
1573+ * years (and I do not think will be changed in near future).
15741574 */
15751575const InvalidOid = 0 ;
15761576const oidIsValid = ( oid : number ) => Number . isInteger ( oid ) && oid !== InvalidOid ;
@@ -1585,13 +1585,18 @@ const InvalidAttrNumber = 0;
15851585export class NodeVariable extends RealVariable {
15861586 /**
15871587 * Real tag of node without 'T_' prefix.
1588- * @example AggPath
1588+ *
1589+ * NOTE: if you want to remove 'T_' prefix, then do not use replace('T_', ''),
1590+ * because it can replace substring *inside* typename. Instead
1591+ * for check use `startsWith('T_')` and to trim `substring(2)`
1592+ *
1593+ * @example AggPath, List
15891594 */
15901595 realNodeTag : string ;
15911596
15921597 constructor ( realNodeTag : string , args : RealVariableArgs ) {
15931598 super ( args ) ;
1594- this . realNodeTag = realNodeTag . replace ( 'T_' , '' ) ;
1599+ this . realNodeTag = realNodeTag ;
15951600 }
15961601
15971602 protected computeEffectiveType ( ) {
You can’t perform that action at this time.
0 commit comments