Skip to content

Statement level query tag in NodeJS connector#366

Open
jiabin-hu wants to merge 5 commits intomainfrom
jiabin-hu/query-tags
Open

Statement level query tag in NodeJS connector#366
jiabin-hu wants to merge 5 commits intomainfrom
jiabin-hu/query-tags

Conversation

@jiabin-hu
Copy link
Copy Markdown
Collaborator

Summary

  • Adds queryTags option to ExecuteStatementOptions for per-statement query tagging
  • Implements serializeQueryTags() utility that converts a key/value dict to a comma-separated key:value string (matching the Python connector's format), with backslash-escaping for special characters in values
  • Serialized tags are passed via confOverlay["query_tags"] on TExecuteStatementReq, consistent with the Python connector
    implementation

This PR replaces #339

Test plan

  • Unit tests for serializeQueryTags covering null/empty input, basic serialization, null values, and special character escaping (tests/unit/utils/queryTags.test.ts)
  • Unit tests for executeStatement verifying confOverlay.query_tags is set/unset correctly (tests/unit/DBSQLSession.test.ts)
  • Run npm test to confirm all unit tests pass

Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
Co-authored-by: Isaac
Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
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.

1 participant