Skip to content

Commit

Permalink
Added a testcase for field name casing.
Browse files Browse the repository at this point in the history
  • Loading branch information
allenc3 committed Jun 16, 2020
1 parent 7ddba88 commit 3a03d46
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -996,4 +996,17 @@ public void testAllowUnknownUnsupportedFields() {
verify(mockBigquery, times(1)).getTable(any(TableId.class));
verify(mockBigqueryTable, times(1)).getDefinition();
}

@Test
public void testLowerCase() {
customizeSchema(
Schema.of(
Field.newBuilder("tEsT_fIeLd_TyPe", LegacySQLTypeName.STRING)
.setMode(Field.Mode.NULLABLE)
.build()));
SchemaCompact compact = SchemaCompact.getInstance(mockBigquery);
compact.check("projects/p/datasets/d/tables/t", StringType.getDescriptor(), true);
verify(mockBigquery, times(1)).getTable(any(TableId.class));
verify(mockBigqueryTable, times(1)).getDefinition();
}
}

0 comments on commit 3a03d46

Please sign in to comment.