com.google.api.services.bigquery.model.TableRow.size()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(124)

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

TableRow.size介绍

暂无

代码示例

代码示例来源:origin: org.apache.beam/beam-examples-java

static String canonicalFormat(TableRow row) {
 List<String> entries = Lists.newArrayListWithCapacity(row.size());
 for (Map.Entry<String, Object> entry : row.entrySet()) {
  entries.add(entry.getKey() + ":" + entry.getValue());
 }
 Collections.sort(entries);
 return Joiner.on(",").join(entries);
}

代码示例来源:origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

@Test
public void testToTableRow_array() {
 TableRow row = toTableRow().apply(ARRAY_ROW);
 assertThat(row, hasEntry("ids", Arrays.asList(123L, 124L)));
 assertThat(row.size(), equalTo(1));
}

代码示例来源:origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

@Test
public void testToTableRow_array_row() {
 TableRow row = toTableRow().apply(ARRAY_ROW_ROW);
 assertThat(row.size(), equalTo(1));
 row = ((List<TableRow>) row.get("rows")).get(0);
 assertThat(row.size(), equalTo(5));
 assertThat(row, hasEntry("id", 123L));
 assertThat(row, hasEntry("value", 123.456));
 assertThat(row, hasEntry("name", "test"));
 assertThat(row, hasEntry("valid", false));
}

代码示例来源:origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

@Test
public void testToTableRow_row() {
 TableRow row = toTableRow().apply(ROW_ROW);
 assertThat(row.size(), equalTo(1));
 row = (TableRow) row.get("row");
 assertThat(row.size(), equalTo(5));
 assertThat(row, hasEntry("id", 123L));
 assertThat(row, hasEntry("value", 123.456));
 assertThat(row, hasEntry("name", "test"));
 assertThat(row, hasEntry("valid", false));
}

代码示例来源:origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

@Test
public void testToTableRow_flat() {
 TableRow row = toTableRow().apply(FLAT_ROW);
 assertThat(row.size(), equalTo(5));
 assertThat(row, hasEntry("id", 123L));
 assertThat(row, hasEntry("value", 123.456));
 assertThat(row, hasEntry("name", "test"));
 assertThat(row, hasEntry("valid", false));
}

代码示例来源:origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

@Test
 public void testToTableRow_null_row() {
  TableRow row = toTableRow().apply(NULL_FLAT_ROW);

  assertThat(row.size(), equalTo(5));
  assertThat(row, hasEntry("id", null));
  assertThat(row, hasEntry("value", null));
  assertThat(row, hasEntry("name", null));
  assertThat(row, hasEntry("timestamp", null));
  assertThat(row, hasEntry("valid", null));
 }
}

相关文章