MCPcopy Create free account
hub / github.com/apache/calcite / stripAs

Method stripAs

core/src/main/java/org/apache/calcite/sql/SqlUtil.java:1078–1083  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 *

Callers 15

forEachAggMethod · 0.95
usedColumnNamesMethod · 0.95
getSelectListItemMethod · 0.95
stripListAsMethod · 0.95
stripAsFromOrderMethod · 0.95
rewriteMethod · 0.95
resolveColumnMethod · 0.95
lookupMeasureMethod · 0.95
populateAliasesMethod · 0.95
convertOrderItemMethod · 0.80
expandSelectItemMethod · 0.80

Calls 2

operandMethod · 0.65
getKindMethod · 0.45

Tested by 1

assertIntervalMethod · 0.64