Skip to content

refactor: rename AnalyticsFormat to API enum names (JSON_ARRAY, ARROW_STREAM)#328

Open
jamesbroadhead wants to merge 1 commit intostack/arrow-1-coverage-testsfrom
stack/arrow-2-format-rename
Open

refactor: rename AnalyticsFormat to API enum names (JSON_ARRAY, ARROW_STREAM)#328
jamesbroadhead wants to merge 1 commit intostack/arrow-1-coverage-testsfrom
stack/arrow-2-format-rename

Conversation

@jamesbroadhead
Copy link
Copy Markdown
Contributor

Summary

Pure mechanical rename of the client-side analytics format model:

  • "JSON""JSON_ARRAY"
  • "ARROW""ARROW_STREAM"

These match the verbatim enum values in the Databricks Statement Execution API (Format), so we no longer translate to/from local aliases.

Stack

Based on #327. Review independently — no behavior change.

Breaking change note

Direct consumers of useAnalyticsQuery passing explicit format: "JSON" or format: "ARROW" will need to update to "JSON_ARRAY" / "ARROW_STREAM". Consumers of useChartData (which takes lowercase "json"/"arrow"/"auto") are unaffected.

Test plan

  • Existing tests pass after rename
  • No production behavior change
  • TypeScript types update correctly through AnalyticsFormat

This pull request was AI-assisted by Isaac.

Renames the client-side analytics format model from "JSON"/"ARROW" to
"JSON_ARRAY"/"ARROW_STREAM" to match the Statement Execution API enum
verbatim — no more local-name to API-name translation.

Pure mechanical rename. No behavior change. Internal type values only;
the lowercase user-facing values passed to useChartData ("json", "arrow",
"auto") are unchanged.

Carved out of #256 (#327 is layer 1, this is layer 2). The actual
inline-Arrow-IPC + warehouse-fallback fix sits on top of this in layer 3.

Note: this is a breaking change for any direct consumer of
useAnalyticsQuery passing explicit format: "JSON" or "ARROW" — they will
need to update to "JSON_ARRAY" / "ARROW_STREAM". Consumers using
useChartData (lowercase "json"/"arrow"/"auto") are unaffected.

Co-authored-by: Isaac
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