-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add missing storage related fields to Table, TableInfo and StandardTableDefinition #2673
feat: Add missing storage related fields to Table, TableInfo and StandardTableDefinition #2673
Conversation
c3c117b
to
df85341
Compare
@Neenu1995 @farhan0102 can you please review this PR? Thanks in advance |
@@ -1451,6 +1451,9 @@ public void testCreateAndGetTable() { | |||
assertNotNull(remoteTable.getLastModifiedTime()); | |||
assertNotNull(remoteTable.<StandardTableDefinition>getDefinition().getNumBytes()); | |||
assertNotNull(remoteTable.<StandardTableDefinition>getDefinition().getNumLongTermBytes()); | |||
assertNotNull(remoteTable.<StandardTableDefinition>getDefinition().getNumTotalLogicalBytes()); | |||
assertNotNull(remoteTable.<StandardTableDefinition>getDefinition().getNumActiveLogicalBytes()); | |||
assertNotNull(remoteTable.<StandardTableDefinition>getDefinition().getNumLongTermLogicalBytes()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: We cannot add the rest of the newly added fields like TimeTravelBytes
etc since they are not available for a table created few seconds ago.
The
This is due to the fact there's a bug in the generated code of The JSON mapper is expecting the key to be I ran the integration test while attached to a debugger and inspected the tablePb.getNumTotalLogicalBytes() // shall return null
tablePb.get("numTotalLogicalBytes") // shall return a valid long value I have filed an issue googleapis/google-api-java-client-services#16915 @Neenu1995 @prash-mi I took a look at the google-api-services-bigquery but it seems there input JSON required for generating the bigquery client is not open-sourced or at least not available in that repository, please correct me if I am wrong and please let me know how to proceed next? |
965557e
to
a39b96a
Compare
Hi @Neenu1995 - based on this comment googleapis/google-api-java-client-services#16915 (comment) from shollyman, I checked the discovery document and the revision number is I ran a test of my own to verify the newly added fields are populated. Can you please re-run the necessary tests and remove the |
Hi @Neenu1995 thanks for adding run labels. It seems the Error: Unable to locate enclosing class com.google.cloud.bigquery. for nested class com.google.cloud.bigquery.$AutoValue_Labels
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition: Abstract method 'public java.lang.Long getNumActiveLogicalBytes()' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition: Abstract method 'public java.lang.Long getNumActivePhysicalBytes()' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition: Abstract method 'public java.lang.Long getNumLongTermLogicalBytes()' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition: Abstract method 'public java.lang.Long getNumLongTermPhysicalBytes()' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition: Abstract method 'public java.lang.Long getNumTimeTravelPhysicalBytes()' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition: Abstract method 'public java.lang.Long getNumTotalLogicalBytes()' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition: Abstract method 'public java.lang.Long getNumTotalPhysicalBytes()' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition$Builder: Abstract method 'public com.google.cloud.bigquery.StandardTableDefinition$Builder setNumActiveLogicalBytes(java.lang.Long)' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition$Builder: Abstract method 'public com.google.cloud.bigquery.StandardTableDefinition$Builder setNumActivePhysicalBytes(java.lang.Long)' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition$Builder: Abstract method 'public com.google.cloud.bigquery.StandardTableDefinition$Builder setNumLongTermLogicalBytes(java.lang.Long)' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition$Builder: Abstract method 'public com.google.cloud.bigquery.StandardTableDefinition$Builder setNumLongTermPhysicalBytes(java.lang.Long)' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition$Builder: Abstract method 'public com.google.cloud.bigquery.StandardTableDefinition$Builder setNumTimeTravelPhysicalBytes(java.lang.Long)' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition$Builder: Abstract method 'public com.google.cloud.bigquery.StandardTableDefinition$Builder setNumTotalLogicalBytes(java.lang.Long)' has been added
Error: 7013: com.google.cloud.bigquery.StandardTableDefinition$Builder: Abstract method 'public com.google.cloud.bigquery.StandardTableDefinition$Builder setNumTotalPhysicalBytes(java.lang.Long)' has been added
[INFO] ------------------------------------------------------------------------ |
To fix, the clirr check, please add exceptions to the clirr-ignored-differences file according to this doc. |
Thanks @Neenu1995 for the doc, fixed it in the latest commit. |
@@ -2863,4 +2865,27 @@ public void testTestIamPermissionsWhenNoPermissionsGranted() { | |||
assertEquals(perms, ImmutableList.of()); | |||
verify(bigqueryRpcMock).testIamPermissions(resourceId, checkedPermissions, EMPTY_RPC_OPTIONS); | |||
} | |||
|
|||
@Test | |||
public void testSumeet() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clean up personal tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the personal test(s).
Thanks for pointing it out.
Please re-run the checks 😄
Thank you @Neenu1995 for approving the PR and guiding us with TODOs to get in this change. Looking forward to future contributions. |
Thanks for contributing ti the Bigquery library @sumeetgajjar |
🤖 I have created a release *beep* *boop* --- ## [2.30.0](https://togithub.com/googleapis/java-bigquery/compare/v2.29.0...v2.30.0) (2023-07-17) ### Features * Add missing storage related fields to Table, TableInfo and StandardTableDefinition ([#2673](https://togithub.com/googleapis/java-bigquery/issues/2673)) ([e3003f4](https://togithub.com/googleapis/java-bigquery/commit/e3003f48df9cca2bd549d893ffef3bb198a3b2aa)) * Add support for Search statistics ([#2787](https://togithub.com/googleapis/java-bigquery/issues/2787)) ([344f695](https://togithub.com/googleapis/java-bigquery/commit/344f695e319470acf350ebdd56d643c03704ea1f)) ### Dependencies * Update dependency com.google.api.grpc:proto-google-cloud-bigqueryconnection-v1 to v2.22.0 ([#2777](https://togithub.com/googleapis/java-bigquery/issues/2777)) ([078f244](https://togithub.com/googleapis/java-bigquery/commit/078f244572db7484471d2c55a0db4533de0d1dc7)) * Update dependency com.google.cloud:google-cloud-datacatalog-bom to v1.26.0 ([#2778](https://togithub.com/googleapis/java-bigquery/issues/2778)) ([2ee52c9](https://togithub.com/googleapis/java-bigquery/commit/2ee52c934d253d29c16b25d498ebe8e968cda481)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.13.0 ([#2786](https://togithub.com/googleapis/java-bigquery/issues/2786)) ([dd14eee](https://togithub.com/googleapis/java-bigquery/commit/dd14eee126f3cb6be7c943157e65acd5d4a088d4)) * Update github/codeql-action action to v2.20.1 ([#2766](https://togithub.com/googleapis/java-bigquery/issues/2766)) ([2014613](https://togithub.com/googleapis/java-bigquery/commit/201461351ac9813f6d11e6f5c3b9ec4dd01c001b)) * Update github/codeql-action action to v2.20.4 ([#2784](https://togithub.com/googleapis/java-bigquery/issues/2784)) ([e886f5f](https://togithub.com/googleapis/java-bigquery/commit/e886f5fa79aee469fe7b8860b5e87951635b6ce7)) * Update ossf/scorecard-action action to v2.2.0 ([#2775](https://togithub.com/googleapis/java-bigquery/issues/2775)) ([688b2a0](https://togithub.com/googleapis/java-bigquery/commit/688b2a0b16b578dc0784094608b35cb3a68f151b)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #2672 ☕️