Skip to content

Conversation

@tseaver
Copy link
Contributor

@tseaver tseaver commented Dec 20, 2016

Closes: #2887.

/cc @tswast

@tseaver tseaver added api: bigquery Issues related to the BigQuery API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 20, 2016
@tseaver tseaver requested a review from dhermes December 20, 2016 21:19
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 20, 2016
@tseaver tseaver requested a review from daspecster December 20, 2016 21:19
def test_from_api_repr_wo_name(self):
RESOURCE = {
'parameterType': {
'type': 'STRUTCT',

This comment was marked as spam.

Copy link
Contributor

@dhermes dhermes left a comment

Choose a reason for hiding this comment

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

I defer to @tswast on the correctness of this

types = instance.struct_types
for item in resource['parameterType']['structTypes']:
types[item['name']] = item['type']
types[item['name']] = item['type']['type']

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

"""
types = [
{'name': key, 'type': value}
{'name': key, 'type': {'type': value}}

This comment was marked as spam.

Copy link
Contributor

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Thanks!

types = instance.struct_types
for item in resource['parameterType']['structTypes']:
types[item['name']] = item['type']
types[item['name']] = item['type']['type']

This comment was marked as spam.

types = instance.struct_types
for item in resource['parameterType']['structTypes']:
types[item['name']] = item['type']
types[item['name']] = item['type']['type']

This comment was marked as spam.

@tseaver tseaver merged commit 455eaf6 into googleapis:master Dec 21, 2016
@tseaver tseaver deleted the 2887-bigquery-struct-query-parm branch December 21, 2016 18:18
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
…query-parm

Conform to expected wire format for struct query parameters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants