org.apache.calcite.util.Util.debugCode()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(126)

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

Util.debugCode介绍

[英]Prints the given code with line numbering.
[中]打印带有行号的给定代码。

代码示例

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

String s = Expressions.toString(declarations, "\n", false);
if (CalcitePrepareImpl.DEBUG) {
 Util.debugCode(System.out, s);

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

String s = Expressions.toString(declarations, "\n", false);
if (CalcitePrepareImpl.DEBUG) {
 Util.debugCode(System.out, s);

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

String code = Expressions.toString(methodDecl);
if (CalcitePrepareImpl.DEBUG) {
 Util.debugCode(System.out, code);

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

String code = Expressions.toString(methodDecl);
if (CalcitePrepareImpl.DEBUG) {
 Util.debugCode(System.out, code);

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

public static Bindable toBindable(Map<String, Object> parameters,
  CalcitePrepare.SparkHandler spark, EnumerableRel rel,
  EnumerableRel.Prefer prefer) {
 EnumerableRelImplementor relImplementor =
   new EnumerableRelImplementor(rel.getCluster().getRexBuilder(),
     parameters);
 final ClassDeclaration expr = relImplementor.implementRoot(rel, prefer);
 String s = Expressions.toString(expr.memberDeclarations, "\n", false);
 if (CalcitePrepareImpl.DEBUG) {
  Util.debugCode(System.out, s);
 }
 Hook.JAVA_PLAN.run(s);
 try {
  if (spark != null && spark.enabled()) {
   return spark.compile(expr, s);
  } else {
   return getBindable(expr, s, rel.getRowType().getFieldCount());
  }
 } catch (Exception e) {
  throw Helper.INSTANCE.wrap("Error while compiling generated Java code:\n"
    + s, e);
 }
}

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

public static Bindable toBindable(Map<String, Object> parameters,
  CalcitePrepare.SparkHandler spark, EnumerableRel rel,
  EnumerableRel.Prefer prefer) {
 EnumerableRelImplementor relImplementor =
   new EnumerableRelImplementor(rel.getCluster().getRexBuilder(),
     parameters);
 final ClassDeclaration expr = relImplementor.implementRoot(rel, prefer);
 String s = Expressions.toString(expr.memberDeclarations, "\n", false);
 if (CalcitePrepareImpl.DEBUG) {
  Util.debugCode(System.out, s);
 }
 Hook.JAVA_PLAN.run(s);
 try {
  if (spark != null && spark.enabled()) {
   return spark.compile(expr, s);
  } else {
   return getBindable(expr, s, rel.getRowType().getFieldCount());
  }
 } catch (Exception e) {
  throw Helper.INSTANCE.wrap("Error while compiling generated Java code:\n"
    + s, e);
 }
}

相关文章