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

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

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

Util.matches介绍

[英]Returns whether a name matches another according to a given case-sensitivity policy.
[中]根据给定的区分大小写策略返回一个名称是否与另一个名称匹配。

代码示例

代码示例来源:origin: dremio/dremio-oss

@Override
public boolean matches(String string, String name) {
 return Util.matches(caseSensitive, string, name);
}

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

public RelDataTypeField getField(String fieldName, boolean caseSensitive,
  boolean elideRecord) {
 for (RelDataTypeField field : fieldList) {
  if (Util.matches(caseSensitive, field.getName(), fieldName)) {
   return field;

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

public RelDataTypeField getField(String fieldName, boolean caseSensitive,
  boolean elideRecord) {
 for (RelDataTypeField field : fieldList) {
  if (Util.matches(caseSensitive, field.getName(), fieldName)) {
   return field;

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

private static void getFieldRecurse(List<Slot> slots, RelDataType type,
  int depth, String fieldName, boolean caseSensitive) {
 while (slots.size() <= depth) {
  slots.add(new Slot());
 }
 final Slot slot = slots.get(depth);
 for (RelDataTypeField field : type.getFieldList()) {
  if (Util.matches(caseSensitive, field.getName(), fieldName)) {
   slot.count++;
   slot.field = field;
  }
 }
 // No point looking to depth + 1 if there is a hit at depth.
 if (slot.count == 0) {
  for (RelDataTypeField field : type.getFieldList()) {
   if (field.getType().isStruct()) {
    getFieldRecurse(slots, field.getType(), depth + 1,
      fieldName, caseSensitive);
   }
  }
 }
}

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

private static void getFieldRecurse(List<Slot> slots, RelDataType type,
  int depth, String fieldName, boolean caseSensitive) {
 while (slots.size() <= depth) {
  slots.add(new Slot());
 }
 final Slot slot = slots.get(depth);
 for (RelDataTypeField field : type.getFieldList()) {
  if (Util.matches(caseSensitive, field.getName(), fieldName)) {
   slot.count++;
   slot.field = field;
  }
 }
 // No point looking to depth + 1 if there is a hit at depth.
 if (slot.count == 0) {
  for (RelDataTypeField field : type.getFieldList()) {
   if (field.getType().isStruct()) {
    getFieldRecurse(slots, field.getType(), depth + 1,
      fieldName, caseSensitive);
   }
  }
 }
}

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

if (Util.matches(caseSensitive, f.getName(), fieldName)) {
 return Pair.of(f, false);

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

if (Util.matches(caseSensitive, f.getName(), fieldName)) {
 return Pair.of(f, false);

相关文章