If a node is "AS", returns the underlying expression; otherwise returns the node. Returns null if and only if the node is null.
(@PolyNull SqlNode node)
| 1076 | /** If a node is "AS", returns the underlying expression; otherwise returns |
| 1077 | * the node. Returns null if and only if the node is null. */ |
| 1078 | public static @PolyNull SqlNode stripAs(@PolyNull SqlNode node) { |
| 1079 | if (node != null && node.getKind() == SqlKind.AS) { |
| 1080 | return ((SqlCall) node).operand(0); |
| 1081 | } |
| 1082 | return node; |
| 1083 | } |
| 1084 | |
| 1085 | /** Modifies a list of nodes, removing AS from each if present. |
| 1086 | * |