goccy / bigquery-emulator

BigQuery emulator server implemented in Go
MIT License
821 stars 108 forks source link

The java bigquery library expects more values to be returned from an update table call than currently returned #363

Open KasperJanssens opened 3 hours ago

KasperJanssens commented 3 hours ago

What happened?

When performing an update call, e.g. adding a column,for instance with this payload to an existing table called campaigns here { "schema" : { "fields" : [ { "name" : "bleuh", "type" : "STRING" } ] }, "tableReference" : { "datasetId" : "service", "projectId" : "test-project", "tableId" : "campaigns" } } The json being returned is exactly the json that has been sent. The java library expects at least the table type to be present as well (will throw an exception)

What did you expect to happen?

I expect the table update call to function when adding a column, likely by returning an instance of 'table'. At the least the table type ("TABLE, VIEW, EXTERNAL, SNAPSHOT, ...) seems to be expected and needed by the library.

How can we reproduce it (as minimally and precisely as possible)?

any java update table call will have this issue. When performing an update through curl, you can also see that the table key is not returned, it reflects the input json it seems

Anything else we need to know?

No response

KasperJanssens commented 3 hours ago

When looking through the documentation of the rest server it seems to say this on the update call

Response body If successful, the response body contains an instance of Table.

docs

so I guess what's expected is the same content as what's being returned from a GET call