org.apache.parquet.schema.MessageType.union()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(91)

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

MessageType.union介绍

暂无

代码示例

代码示例来源:origin: org.apache.parquet/parquet-column

public MessageType union(MessageType toMerge) {
 return union(toMerge, true);
}

代码示例来源:origin: org.apache.parquet/parquet-hadoop

/**
 * will return the result of merging toMerge into mergedSchema
 * @param toMerge the schema to merge into mergedSchema
 * @param mergedSchema the schema to append the fields to
 * @param strict should schema primitive types match
 * @return the resulting schema
 */
static MessageType mergeInto(MessageType toMerge, MessageType mergedSchema, boolean strict) {
 if (mergedSchema == null) {
  return toMerge;
 }
 return mergedSchema.union(toMerge, strict);
}

代码示例来源:origin: org.lasersonlab.apache.parquet/parquet-hadoop

/**
 * will return the result of merging toMerge into mergedSchema
 * @param toMerge the schema to merge into mergedSchema
 * @param mergedSchema the schema to append the fields to
 * @param strict should schema primitive types match
 * @return the resulting schema
 */
static MessageType mergeInto(MessageType toMerge, MessageType mergedSchema, boolean strict) {
 if (mergedSchema == null) {
  return toMerge;
 }
 return mergedSchema.union(toMerge, strict);
}

代码示例来源:origin: org.lasersonlab.apache.parquet/parquet-column

public MessageType union(MessageType toMerge) {
 return union(toMerge, true);
}

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

projection = new MessageType(messageName, t);
} else {
 projection = projection.union(new MessageType(messageName, t));

代码示例来源:origin: org.apache.drill.exec/drill-java-exec

projection = new MessageType(messageName, t);
} else {
 projection = projection.union(new MessageType(messageName, t));

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

public static void main(String[] args) {
  MessageType message1;
  MessageType message2;

  PrimitiveType c = new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.INT32, "c");
  GroupType b = new GroupType(Repetition.REQUIRED, "b");
  GroupType a = new GroupType(Repetition.OPTIONAL, "a", b);
  message1 = new MessageType("root", a);

  PrimitiveType c2 = new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.INT32, "d");
  GroupType b2 = new GroupType(Repetition.OPTIONAL, "b", c2);
  GroupType a2 = new GroupType(Repetition.OPTIONAL, "a", b2);
  message2 = new MessageType("root", a2);

  MessageType message3 = message1.union(message2);

  StringBuilder builder = new StringBuilder();
  message3.writeToStringBuilder(builder, "");
  System.out.println(builder);
 }
}

相关文章