Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit d3f4787

Browse files
authored
fix: Renamed SchemaCompact.java to SchemaCompatibility.java (#362)
* Renaming SchemaCompact.java to SchemaCompatibility.java, and changed all instances of SchemaCompact. * Update clirr-ignore file * Fixed class name * Fix small typo
1 parent 27c55e9 commit d3f4787

7 files changed

Lines changed: 65 additions & 49 deletions

File tree

google-cloud-bigquerystorage/clirr-ignored-differences.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,20 @@
1212
<className>com/google/cloud/bigquery/storage/v1alpha2/StreamWriter</className>
1313
<method>boolean awaitTermination(long, java.util.concurrent.TimeUnit) </method>
1414
</difference>
15-
</differences>
15+
<difference>
16+
<differenceType>7005</differenceType>
17+
<className>com/google/cloud/bigquery/storage/v1alpha2/DirectWriter</className>
18+
<method>void testSetStub(com.google.cloud.bigquery.storage.v1alpha2.BigQueryWriteClient, int, com.google.cloud.bigquery.storage.v1alpha2.SchemaCompact) </method>
19+
<to>void testSetStub(com.google.cloud.bigquery.storage.v1alpha2.BigQueryWriteClient, int, com.google.cloud.bigquery.storage.v1alpha2.SchemaCompatibility)</to>
20+
</difference>
21+
<difference>
22+
<differenceType>8001</differenceType>
23+
<className>com/google/cloud/bigquery/storage/v1alpha2/SchemaCompact</className>
24+
</difference>
25+
<difference>
26+
<differenceType>7005</differenceType>
27+
<className>com/google/cloud/bigquery/storage/v1alpha2/WriterCache</className>
28+
<method>com.google.cloud.bigquery.storage.v1alpha2.WriterCache getTestInstance(com.google.cloud.bigquery.storage.v1alpha2.BigQueryWriteClient, int, com.google.cloud.bigquery.storage.v1alpha2.SchemaCompact) </method>
29+
<to>com.google.cloud.bigquery.storage.v1alpha2.WriterCache getTestInstance(com.google.cloud.bigquery.storage.v1alpha2.BigQueryWriteClient, int, com.google.cloud.bigquery.storage.v1alpha2.SchemaCompatibility)</to>
30+
</difference>
31+
</differences>

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/DirectWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public Long apply(Storage.AppendRowsResponse appendRowsResponse) {
9999

100100
@VisibleForTesting
101101
public static void testSetStub(
102-
BigQueryWriteClient stub, int maxTableEntry, SchemaCompact schemaCheck) {
102+
BigQueryWriteClient stub, int maxTableEntry, SchemaCompatibility schemaCheck) {
103103
cache = WriterCache.getTestInstance(stub, maxTableEntry, schemaCheck);
104104
}
105105

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/SchemaCompact.java renamed to google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/SchemaCompatibility.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
* <p>The implementation as of now is not complete, which measn, if this check passed, there is
4242
* still a possbility of writing will fail.
4343
*/
44-
public class SchemaCompact {
44+
public class SchemaCompatibility {
4545
private BigQuery bigquery;
46-
private static SchemaCompact compact;
46+
private static SchemaCompatibility compact;
4747
private static String tablePatternString = "projects/([^/]+)/datasets/([^/]+)/tables/([^/]+)";
4848
private static Pattern tablePattern = Pattern.compile(tablePatternString);
4949
private static final int NestingLimit = 15;
@@ -70,33 +70,33 @@ public class SchemaCompact {
7070
Descriptors.FieldDescriptor.Type.GROUP,
7171
Descriptors.FieldDescriptor.Type.ENUM)));
7272

73-
private SchemaCompact(BigQuery bigquery) {
74-
// TODO: Add functionality that allows SchemaCompact to build schemas.
73+
private SchemaCompatibility(BigQuery bigquery) {
74+
// TODO: Add functionality that allows SchemaCompatibility to build schemas.
7575
this.bigquery = bigquery;
7676
}
7777

7878
/**
79-
* Gets a singleton {code SchemaCompact} object.
79+
* Gets a singleton {code SchemaCompatibility} object.
8080
*
8181
* @return
8282
*/
83-
public static SchemaCompact getInstance() {
83+
public static SchemaCompatibility getInstance() {
8484
if (compact == null) {
8585
RemoteBigQueryHelper bigqueryHelper = RemoteBigQueryHelper.create();
86-
compact = new SchemaCompact(bigqueryHelper.getOptions().getService());
86+
compact = new SchemaCompatibility(bigqueryHelper.getOptions().getService());
8787
}
8888
return compact;
8989
}
9090

9191
/**
92-
* Gets a {code SchemaCompact} object with custom BigQuery stub.
92+
* Gets a {code SchemaCompatibility} object with custom BigQuery stub.
9393
*
9494
* @param bigquery
9595
* @return
9696
*/
9797
@VisibleForTesting
98-
public static SchemaCompact getInstance(BigQuery bigquery) {
99-
return new SchemaCompact(bigquery);
98+
public static SchemaCompatibility getInstance(BigQuery bigquery) {
99+
return new SchemaCompatibility(bigquery);
100100
}
101101

102102
private TableId getTableId(String tableName) {

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/WriterCache.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public class WriterCache {
4747
private static final int MAX_WRITERS_PER_TABLE = 2;
4848

4949
private final BigQueryWriteClient stub;
50-
private final SchemaCompact compact;
50+
private final SchemaCompatibility compact;
5151

52-
private WriterCache(BigQueryWriteClient stub, int maxTableEntry, SchemaCompact compact) {
52+
private WriterCache(BigQueryWriteClient stub, int maxTableEntry, SchemaCompatibility compact) {
5353
this.stub = stub;
5454
this.compact = compact;
5555
writerCache =
@@ -71,15 +71,15 @@ public static WriterCache getInstance() throws IOException {
7171
if (instance == null) {
7272
BigQueryWriteSettings stubSettings = BigQueryWriteSettings.newBuilder().build();
7373
BigQueryWriteClient stub = BigQueryWriteClient.create(stubSettings);
74-
instance = new WriterCache(stub, MAX_TABLE_ENTRY, SchemaCompact.getInstance());
74+
instance = new WriterCache(stub, MAX_TABLE_ENTRY, SchemaCompatibility.getInstance());
7575
}
7676
return instance;
7777
}
7878

7979
/** Returns a cache with custom stub used by test. */
8080
@VisibleForTesting
8181
public static WriterCache getTestInstance(
82-
BigQueryWriteClient stub, int maxTableEntry, SchemaCompact compact) {
82+
BigQueryWriteClient stub, int maxTableEntry, SchemaCompatibility compact) {
8383
return new WriterCache(stub, maxTableEntry, compact);
8484
}
8585

google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/DirectWriterTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class DirectWriterTest {
5353
private BigQueryWriteClient client;
5454
private LocalChannelProvider channelProvider;
5555

56-
@Mock private static SchemaCompact schemaCheck;
56+
@Mock private static SchemaCompatibility schemaCheck;
5757

5858
@BeforeClass
5959
public static void startStaticServer() {

0 commit comments

Comments
 (0)