org.apache.calcite.rel.RelNode.collectVariablesUsed()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中org.apache.calcite.rel.RelNode.collectVariablesUsed方法的一些代码示例,展示了RelNode.collectVariablesUsed的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RelNode.collectVariablesUsed方法的具体详情如下:
包路径:org.apache.calcite.rel.RelNode
类名称:RelNode
方法名:collectVariablesUsed

RelNode.collectVariablesUsed介绍

[英]Collects variables known to be used by this expression or its descendants. By default, no such information is available and must be derived by analyzing sub-expressions, but some optimizer implementations may insert special expressions which remember such information.
[中]收集此表达式或其子代使用的已知变量。默认情况下,没有此类信息可用,必须通过分析子表达式来派生,但一些优化器实现可能会插入记住此类信息的特殊表达式。

代码示例

代码示例来源:origin: Qihoo360/Quicksql

public void visit(
   RelNode p,
   int ordinal,
   RelNode parent) {
  super.visit(p, ordinal, parent);
  p.collectVariablesUsed(variables);
  // Important! Remove stopped variables AFTER we visit children
  // (which what super.visit() does)
  variables.removeAll(p.getVariablesSet());
 }
}

代码示例来源:origin: org.apache.calcite/calcite-core

public void visit(
   RelNode p,
   int ordinal,
   RelNode parent) {
  super.visit(p, ordinal, parent);
  p.collectVariablesUsed(variables);
  // Important! Remove stopped variables AFTER we visit children
  // (which what super.visit() does)
  variables.removeAll(p.getVariablesSet());
 }
}

代码示例来源:origin: Qihoo360/Quicksql

@Override public RelNode visit(RelNode other) {
  other.collectVariablesUsed(vuv.variables);
  other.accept(vuv);
  RelNode result = super.visit(other);
  // Important! Remove stopped variables AFTER we visit
  // children. (which what super.visit() does)
  vuv.variables.removeAll(other.getVariablesSet());
  return result;
 }
}

代码示例来源:origin: org.apache.calcite/calcite-core

@Override public RelNode visit(RelNode other) {
  other.collectVariablesUsed(vuv.variables);
  other.accept(vuv);
  RelNode result = super.visit(other);
  // Important! Remove stopped variables AFTER we visit
  // children. (which what super.visit() does)
  vuv.variables.removeAll(other.getVariablesSet());
  return result;
 }
}

相关文章