org.apache.flink.api.common.operators.util.FieldSet.toArray()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(7.7k)|赞(0)|评价(0)|浏览(135)

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

FieldSet.toArray介绍

[英]Transforms the field set into an array of field IDs. Whether the IDs are ordered or unordered depends on the specific subclass of the field set.
[中]

代码示例

代码示例来源:origin: apache/flink

public static FieldList createOrderedFromSet(FieldSet set) {
  if (set instanceof FieldList) {
    return (FieldList) set;
  } else {
    final int[] cols = set.toArray();
    Arrays.sort(cols);
    return new FieldList(cols);
  }
}

代码示例来源:origin: apache/flink

/**
 * Turns the FieldSet into an ordered FieldList.
 * 
 * @return An ordered FieldList.
 */
public FieldList toFieldList() {
  int[] pos = toArray();
  Arrays.sort(pos);
  return new FieldList(pos);
}

代码示例来源:origin: apache/flink

"semantic forwarded field information. Will only use the field with the lowest index.");
newOrdering.appendOrdering(targetField.toArray()[0], this.ordering.getType(i), this.ordering.getOrder(i));
      "semantic forwarded field information. Will only use the field with the lowest index.");
newPartitioningFields = newPartitioningFields.addField(targetField.toArray()[0]);
      "semantic forwarded field information. Will only use the field with the lowest index.");
newFieldCombo = newFieldCombo.addField(targetField.toArray()[0]);

代码示例来源:origin: apache/flink

"semantic forwarded field information. Will only use the field with the lowest index.");
newOrdering.appendOrdering(targetField.toArray()[0], this.ordering.getType(i), this.ordering.getOrder(i));
      "semantic forwarded field information. Will only use the field with the lowest index.");
newGroupedFields = newGroupedFields.addField(targetField.toArray()[0]);
        "semantic forwarded field information. Will only use the field with the lowest index.");
  newFields = newFields.addField(targetField.toArray()[0]);

代码示例来源:origin: apache/flink

int[] arr = set.toArray();
Arrays.sort(arr);
assertTrue(Arrays.equals(arr, elements));

代码示例来源:origin: com.alibaba.blink/flink-core

/**
 * Turns the FieldSet into an ordered FieldList.
 * 
 * @return An ordered FieldList.
 */
public FieldList toFieldList() {
  int[] pos = toArray();
  Arrays.sort(pos);
  return new FieldList(pos);
}

代码示例来源:origin: org.apache.flink/flink-optimizer

public static FieldList createOrderedFromSet(FieldSet set) {
  if (set instanceof FieldList) {
    return (FieldList) set;
  } else {
    final int[] cols = set.toArray();
    Arrays.sort(cols);
    return new FieldList(cols);
  }
}

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

/**
 * Turns the FieldSet into an ordered FieldList.
 * 
 * @return An ordered FieldList.
 */
public FieldList toFieldList() {
  int[] pos = toArray();
  Arrays.sort(pos);
  return new FieldList(pos);
}

代码示例来源:origin: com.alibaba.blink/flink-optimizer

public static FieldList createOrderedFromSet(FieldSet set) {
  if (set instanceof FieldList) {
    return (FieldList) set;
  } else {
    final int[] cols = set.toArray();
    Arrays.sort(cols);
    return new FieldList(cols);
  }
}

代码示例来源:origin: org.apache.flink/flink-optimizer_2.10

public static FieldList createOrderedFromSet(FieldSet set) {
  if (set instanceof FieldList) {
    return (FieldList) set;
  } else {
    final int[] cols = set.toArray();
    Arrays.sort(cols);
    return new FieldList(cols);
  }
}

代码示例来源:origin: org.apache.flink/flink-optimizer_2.11

public static FieldList createOrderedFromSet(FieldSet set) {
  if (set instanceof FieldList) {
    return (FieldList) set;
  } else {
    final int[] cols = set.toArray();
    Arrays.sort(cols);
    return new FieldList(cols);
  }
}

代码示例来源:origin: org.apache.flink/flink-optimizer_2.10

"semantic forwarded field information. Will only use the field with the lowest index.");
newOrdering.appendOrdering(targetField.toArray()[0], this.ordering.getType(i), this.ordering.getOrder(i));
      "semantic forwarded field information. Will only use the field with the lowest index.");
newPartitioningFields = newPartitioningFields.addField(targetField.toArray()[0]);
      "semantic forwarded field information. Will only use the field with the lowest index.");
newFieldCombo = newFieldCombo.addField(targetField.toArray()[0]);

代码示例来源:origin: org.apache.flink/flink-optimizer

"semantic forwarded field information. Will only use the field with the lowest index.");
newOrdering.appendOrdering(targetField.toArray()[0], this.ordering.getType(i), this.ordering.getOrder(i));
      "semantic forwarded field information. Will only use the field with the lowest index.");
newPartitioningFields = newPartitioningFields.addField(targetField.toArray()[0]);
      "semantic forwarded field information. Will only use the field with the lowest index.");
newFieldCombo = newFieldCombo.addField(targetField.toArray()[0]);

代码示例来源:origin: org.apache.flink/flink-optimizer_2.11

"semantic forwarded field information. Will only use the field with the lowest index.");
newOrdering.appendOrdering(targetField.toArray()[0], this.ordering.getType(i), this.ordering.getOrder(i));
      "semantic forwarded field information. Will only use the field with the lowest index.");
newPartitioningFields = newPartitioningFields.addField(targetField.toArray()[0]);
      "semantic forwarded field information. Will only use the field with the lowest index.");
newFieldCombo = newFieldCombo.addField(targetField.toArray()[0]);

代码示例来源:origin: org.apache.flink/flink-optimizer_2.11

"semantic forwarded field information. Will only use the field with the lowest index.");
newOrdering.appendOrdering(targetField.toArray()[0], this.ordering.getType(i), this.ordering.getOrder(i));
      "semantic forwarded field information. Will only use the field with the lowest index.");
newGroupedFields = newGroupedFields.addField(targetField.toArray()[0]);
        "semantic forwarded field information. Will only use the field with the lowest index.");
  newFields = newFields.addField(targetField.toArray()[0]);

代码示例来源:origin: org.apache.flink/flink-optimizer_2.10

"semantic forwarded field information. Will only use the field with the lowest index.");
newOrdering.appendOrdering(targetField.toArray()[0], this.ordering.getType(i), this.ordering.getOrder(i));
      "semantic forwarded field information. Will only use the field with the lowest index.");
newGroupedFields = newGroupedFields.addField(targetField.toArray()[0]);
        "semantic forwarded field information. Will only use the field with the lowest index.");
  newFields = newFields.addField(targetField.toArray()[0]);

代码示例来源:origin: com.alibaba.blink/flink-optimizer

"semantic forwarded field information. Will only use the field with the lowest index.");
newOrdering.appendOrdering(targetField.toArray()[0], this.ordering.getType(i), this.ordering.getOrder(i));
      "semantic forwarded field information. Will only use the field with the lowest index.");
newGroupedFields = newGroupedFields.addField(targetField.toArray()[0]);
        "semantic forwarded field information. Will only use the field with the lowest index.");
  newFields = newFields.addField(targetField.toArray()[0]);

代码示例来源:origin: com.alibaba.blink/flink-optimizer

"semantic forwarded field information. Will only use the field with the lowest index.");
newOrdering.appendOrdering(targetField.toArray()[0], this.ordering.getType(i), this.ordering.getOrder(i));
      "semantic forwarded field information. Will only use the field with the lowest index.");
newPartitioningFields = newPartitioningFields.addField(targetField.toArray()[0]);
      "semantic forwarded field information. Will only use the field with the lowest index.");
newFieldCombo = newFieldCombo.addField(targetField.toArray()[0]);

代码示例来源:origin: org.apache.flink/flink-optimizer

"semantic forwarded field information. Will only use the field with the lowest index.");
newOrdering.appendOrdering(targetField.toArray()[0], this.ordering.getType(i), this.ordering.getOrder(i));
      "semantic forwarded field information. Will only use the field with the lowest index.");
newGroupedFields = newGroupedFields.addField(targetField.toArray()[0]);
        "semantic forwarded field information. Will only use the field with the lowest index.");
  newFields = newFields.addField(targetField.toArray()[0]);

相关文章