Skip to content
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

Add UDF support for BigQuery #1881

Merged
merged 2 commits into from
Oct 19, 2016
Merged

Add UDF support for BigQuery #1881

merged 2 commits into from
Oct 19, 2016

Conversation

ukarlsson
Copy link
Contributor

@ukarlsson ukarlsson commented Oct 13, 2016

No description provided.

@mention-bot
Copy link

@ukarlsson, thanks for your PR! By analyzing the history of the files in this pull request, we identified @blacker, @mikekap and @mbruggmann to be potential reviewers.

Copy link
Contributor

@Tarrasch Tarrasch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I have some basic questions and inline comments though: Can you add a test case? Have this been used in production?

@@ -594,7 +600,8 @@ def run(self):
'allowLargeResults': True,
'createDisposition': self.create_disposition,
'writeDisposition': self.write_disposition,
'flattenResults': self.flatten_results
'flattenResults': self.flatten_results,
'userDefinedFunctionResources': [{"resourceUri": v} for v in self.udf_resource_uris]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a trailing comma please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happened to the trailing comma you added??

@@ -567,6 +567,12 @@ def query_mode(self):
"""The query mode. See :py:class:`QueryMode`."""
return QueryMode.INTERACTIVE

@property
def udf_resource_uris(self):
"""List of code resource to load from a Google Cloud Storage URI (gs://bucket/path).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/List/Iterable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@ukarlsson
Copy link
Contributor Author

I have added tests. Yes, we use this in production

@ukarlsson ukarlsson force-pushed the master branch 3 times, most recently from 0f771ee to 7d3d69a Compare October 17, 2016 08:30
@ukarlsson
Copy link
Contributor Author

@Tarrasch OK thanks have fixed the whitespacing and rebased :)

Copy link
Contributor

@Tarrasch Tarrasch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mix up git branches or something? It seems like a previous amendment got lost. So I "red" this PR again so you can confirm that everything is OK before we merge.

Other than that this is all-merge for me. :)

@@ -594,7 +600,8 @@ def run(self):
'allowLargeResults': True,
'createDisposition': self.create_disposition,
'writeDisposition': self.write_disposition,
'flattenResults': self.flatten_results
'flattenResults': self.flatten_results,
'userDefinedFunctionResources': [{"resourceUri": v} for v in self.udf_resource_uris]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happened to the trailing comma you added??

@Tarrasch Tarrasch merged commit 1c53219 into spotify:master Oct 19, 2016
@Tarrasch
Copy link
Contributor

I merge as this have had many minor iterations already. But I see that @ukarlsson actually never filled out the template in the PR. While it's indeed optional, I think you could jot down some words about why your company needed this patch. What can be done now that you couldn't do before?

Thanks for the patch! :)

This was referenced Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants