[
https://issues.apache.org/jira/browse/BEAM-13806?focusedWorklogId=778318&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-778318
]
ASF GitHub Bot logged work on BEAM-13806:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Jun/22 21:07
Start Date: 03/Jun/22 21:07
Worklog Time Spent: 10m
Work Description: youngoli commented on PR #16818:
URL: https://github.com/apache/beam/pull/16818#issuecomment-1146363217
I added a test that reads from a Query, and while testing in my own
environment I'm getting weird results. The elements output from a query read
have all fields as pointers because SQL queries don't match the table's schema.
That's pretty normal. But when I made an equivalent struct in Go, I get errors
when decoding into that struct, even though all the fields seem to be matching
exactly:
```
panic: reflect: Call using struct { Counter *int64 "beam:\"counter\"";
Rand_data *struct { Flip *bool "beam:\"flip\""; Num *int64 "beam:\"num\""; Word
*string "beam:\"word\"" } "beam:\"rand_data\"" } as type bigquery.TestRowPtrs
Full error:
while executing Process for Plan[s08-67]:
2: DataSink[S[ptransform-65@localhost:12371]]
Coder:W;coder-80<LP;coder-81<R[bigquery.TestRow]>>!GWC
3: PCollection[pcollection-72] Out:[2]
4: ParDo[bigquery.ReadFromQueryPipeline.func1] Out:[2]
1: DataSource[S[ptransform-64@localhost:12371], 0]
Coder:W;coder-76<LP;coder-77<R[struct { Counter *int64 "beam:\"counter\"";
Rand_data *struct { Flip *bool "beam:\"flip\""; Num *int64 "beam:\"num\""; Word
*string "beam:\"word\"" } "beam:\"rand_data\"" }]>>!GWC Out:4
caused by:
panic: reflect: Call using struct { Counter *int64 "beam:\"counter\"";
Rand_data *struct { Flip *bool "beam:\"flip\""; Num *int64 "beam:\"num\""; Word
*string "beam:\"word\"" } "beam:\"rand_data\"" } as type bigquery.TestRowPtrs
goroutine 60 [running]:
runtime/debug.Stack()
...
```
Issue Time Tracking
-------------------
Worklog Id: (was: 778318)
Time Spent: 8h 50m (was: 8h 40m)
> [Cross-Language] Jenkins integration test for Go SDK BigQuery IO.
> -----------------------------------------------------------------
>
> Key: BEAM-13806
> URL: https://issues.apache.org/jira/browse/BEAM-13806
> Project: Beam
> Issue Type: New Feature
> Components: cross-language, io-go-gcp, sdk-go
> Reporter: Daniel Oliveira
> Assignee: Daniel Oliveira
> Priority: P2
> Time Spent: 8h 50m
> Remaining Estimate: 0h
>
> Title says it all. Add an integration test for cross-language BigQuery IO
> that runs on Jenkins.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)