Skip to content

Commit 851ea14

Browse files
committed
Regenerate cli_service.go from thrift instead of hand-editing
Address review feedback: the prior commit added EnforceEmbeddedSchemaCorrectness to internal/cli_service/cli_service.go by hand. Regenerate via the thrift compiler (0.19.0) by adding the field to TCLIService.thrift (0xD19: optional bool enforceEmbeddedSchemaCorrectness = false) and running `thrift -r --gen go TCLIService.thrift`. Because the thrift definition has a default value, the generated field is `bool` (value) rather than `*bool` (pointer). Update connection.go to assign the value directly. Co-authored-by: Isaac
1 parent f3d1048 commit 851ea14

2 files changed

Lines changed: 9 additions & 19 deletions

File tree

connection.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,7 @@ func (c *conn) executeStatement(ctx context.Context, query string, args []driver
323323
req.Parameters = parameters
324324
}
325325

326-
// Add enforce embedded schema correctness if enabled
327-
if c.cfg.EnforceEmbeddedSchemaCorrectness {
328-
req.EnforceEmbeddedSchemaCorrectness = &c.cfg.EnforceEmbeddedSchemaCorrectness
329-
}
326+
req.EnforceEmbeddedSchemaCorrectness = c.cfg.EnforceEmbeddedSchemaCorrectness
330327

331328
resp, err := c.client.ExecuteStatement(ctx, &req)
332329
var log *logger.DBSQLLogger

internal/cli_service/cli_service.go

Lines changed: 8 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)