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

Method getFromNode

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

Returns the n th (0-based) input to a join expression.

(
      SqlSelect query,
      int ordinal)

Source from the content-addressed store, hash-verified

125 * Returns the <code>n</code>th (0-based) input to a join expression.
126 */
127 public static SqlNode getFromNode(
128 SqlSelect query,
129 int ordinal) {
130 SqlNode from = query.getFrom();
131 if (from == null) {
132 throw new AssertionError("from must not be null for " + query);
133 }
134 ArrayList<SqlNode> list = flatten(from);
135 return list.get(ordinal);
136 }
137
138 private static void flatten(
139 SqlNode node,

Callers

nothing calls this directly

Calls 3

flattenMethod · 0.95
getFromMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected