Skip to content

Add enforceEmbeddedSchemaCorrectness to TExecuteStatementReq#344

Open
gopalldb wants to merge 1 commit intomainfrom
gopal.lal/ES-1804970-enforce-embedded-schema-correctness
Open

Add enforceEmbeddedSchemaCorrectness to TExecuteStatementReq#344
gopalldb wants to merge 1 commit intomainfrom
gopal.lal/ES-1804970-enforce-embedded-schema-correctness

Conversation

@gopalldb
Copy link
Copy Markdown
Collaborator

@gopalldb gopalldb commented Apr 6, 2026

Summary

  • Adds a new optional bool field enforceEmbeddedSchemaCorrectness (field ID 0xD19 / 3353) to TExecuteStatementReq in the thrift contract
  • Exposes it as an opt-in configuration parameter (EnforceEmbeddedSchemaCorrectness, default false) via connector option, DSN parameter, and config struct
  • When enabled (true), the field is set in the thrift request so the server enforces embedded schema correctness during query execution

Changes

  • internal/cli_service/cli_service.go — Added field with full Read/Write/IsSet/Equals support following existing *bool pointer pattern
  • internal/config/config.go — Added EnforceEmbeddedSchemaCorrectness to UserConfig + DSN parsing
  • connector.go — Added WithEnforceEmbeddedSchemaCorrectness() connector option
  • connection.go — Wired config to TExecuteStatementReq in executeStatement()

Test plan

  • Verify compilation passes
  • Test with enforceEmbeddedSchemaCorrectness=true in DSN
  • Test with WithEnforceEmbeddedSchemaCorrectness(true) connector option
  • Verify field is serialized in thrift request when enabled
  • Verify field is not sent when disabled (default)

Resolves: ES-1804970

This pull request was AI-assisted by Isaac.

Add a new optional bool field (0xD19) to TExecuteStatementReq in the thrift
contract and expose it as an opt-in configuration parameter. When enabled,
the server enforces embedded schema correctness during query execution.

- Add field to thrift-generated cli_service.go with full Read/Write/Equals support
- Add EnforceEmbeddedSchemaCorrectness to UserConfig (default false)
- Add WithEnforceEmbeddedSchemaCorrectness connector option
- Add DSN parameter support (enforceEmbeddedSchemaCorrectness=true)
- Wire config to TExecuteStatementReq in executeStatement

ES-1804970

Co-authored-by: Isaac
return p.StatementConf
}
var TExecuteStatementReq_EnforceEmbeddedSchemaCorrectness_DEFAULT bool
func (p *TExecuteStatementReq) GetEnforceEmbeddedSchemaCorrectness() bool {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Was this manually added and not by thrift command?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+1, let's make sure this was added by the thrift cli

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