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

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

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

Util.listToString介绍

[英]Converts ["ab", "c"] to "ab"."c".
[中]将[“ab”、“c”]转换为“ab”。“c”。

代码示例

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

public RexNode convertSequenceValue(
  SqlRexContext cx,
  SqlSequenceValueOperator fun,
  SqlCall call) {
 final List<SqlNode> operands = call.getOperandList();
 assert operands.size() == 1;
 assert operands.get(0) instanceof SqlIdentifier;
 final SqlIdentifier id = (SqlIdentifier) operands.get(0);
 final String key = Util.listToString(id.names);
 RelDataType returnType =
   cx.getValidator().getValidatedNodeType(call);
 return cx.getRexBuilder().makeCall(returnType, fun,
   ImmutableList.of(cx.getRexBuilder().makeLiteral(key)));
}

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

public RexNode convertSequenceValue(
  SqlRexContext cx,
  SqlSequenceValueOperator fun,
  SqlCall call) {
 final List<SqlNode> operands = call.getOperandList();
 assert operands.size() == 1;
 assert operands.get(0) instanceof SqlIdentifier;
 final SqlIdentifier id = (SqlIdentifier) operands.get(0);
 final String key = Util.listToString(id.names);
 RelDataType returnType =
   cx.getValidator().getValidatedNodeType(call);
 return cx.getRexBuilder().makeCall(returnType, fun,
   ImmutableList.of(cx.getRexBuilder().makeLiteral(key)));
}

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

private void checkListToString(String... strings) {
 final List<String> list = ImmutableList.copyOf(strings);
 final String asString = Util.listToString(list);
 assertThat(Util.stringToList(asString), is(list));
}

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

private void checkListToString(String... strings) {
 final List<String> list = ImmutableList.copyOf(strings);
 final String asString = Util.listToString(list);
 assertThat(Util.stringToList(asString), is(list));
}

相关文章