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
[BEAM-7862] Moving FakeBigQueryServices to published artifacts #9206
Conversation
r: @amaliujia |
@@ -65,7 +65,7 @@ | |||
* <p>Some BigQuery types are duplicated here since slightly different Avro records are produced | |||
* when exporting data in Avro format and when reading data directly using the read API. | |||
*/ | |||
public static final ImmutableMultimap<String, Type> BIG_QUERY_TO_AVRO_TYPES = |
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.
This is an immutable map that we'd rather not expose in the API, so making sure to make it non-public.
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.
LGTM
@@ -269,6 +269,12 @@ public static Schema fromTableSchema(TableSchema tableSchema) { | |||
return fromTableFieldSchema(tableSchema.getFields()); | |||
} | |||
|
|||
/** Convert a list of BigQuery {@link TableFieldSchema} to Avro {@link org.apache.avro.Schema}. */ | |||
public static org.apache.avro.Schema toGenericAvroSchema( |
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.
Why adding an extra call?
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.
This call works as proxy to BigQueryAvroUtils
, which is not a public class, so it's not accessible from other packages. I did not want to make the whole class public, so instead I added this call to BigQueryUtils
, which is a public class with similar calls for schema conversions.
Please add a meaningful description for your change here
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.