Skip to content

fix(Databricks): round-trip display_name on measures (#326) - #356

Merged
jbonofre merged 2 commits into
apache:mainfrom
christianeu-db:fix-326-measure-display-name
Sep 3, 2026
Merged

fix(Databricks): round-trip display_name on measures (#326)#356
jbonofre merged 2 commits into
apache:mainfrom
christianeu-db:fix-326-measure-display-name

Conversation

@christianeu-db

@christianeu-db christianeu-db commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

The Databricks converter dropped a measure's display_name during the MV -> Ossie -> MV round trip. A dimension's display_name maps to the Apache Ossie field label, but the Apache Ossie metric shape has no label, so a measure's display_name had nowhere to go and was silently lost.

This preserves it in the custom_extensions[DATABRICKS] stash (the same mechanism already used for format and window).

Related Issues

Fixes #326 for the python converter. #333 will be augmented to include this fix for the Java converter.

Checklist

Specification

N/A - no spec changes

  • Spec changes are included in core-spec/ and follow the existing structure
  • Spec changes have been discussed on the mailing list or in a linked issue
  • Breaking changes to the spec are clearly called out in the summary

Ontology

N/A - no ontology changes

  • Ontology changes in ontology/ are consistent with spec changes
  • New or modified terms are defined and documented

Converters

  • Converter logic in converters/ is updated to reflect spec or ontology changes
  • New converters include tests under the converter's test directory

Validation

N/A - no new validation rules

  • Validation rules in validation/ are updated if the spec changed
  • New validation cases are covered by tests

Documentation

N/A no docs

  • docs/ is updated to reflect any user-facing changes
  • New features or behaviors are documented with examples where appropriate
  • CONTRIBUTING.md is updated if the contribution process changed

Examples

N/A - no new examples

  • examples/ are added or updated for any new spec constructs or converter support

Tests

  • All existing tests pass (pytest / CI green)
  • New functionality is covered by tests

Compliance

  • ASF license headers are present on all new source files
  • No third-party dependencies are added without PMC/IPMC approval

AI disclosure

Per the ASF Generative Tooling Guidance, this contribution was prepared with AI assistance. All specification decisions and design choices are mine. I have reviewed and verified every change.

A dimension's display_name maps to the Apache Ossie field `label`, but the
Apache Ossie metric shape has no `label`, so a measure's display_name was
silently dropped in the MV -> Ossie -> MV round trip.

Preserve it in the DATABRICKS custom_extensions stash (the same mechanism as
format/window), kept in a separate MEASURE_STASH_KEYS list so the dimension
path -- which already maps display_name to `label` -- does not also stash it.
The exporter restores it in _convert_metric.

Fixes #326.

Co-authored-by: Isaac <no-reply@databricks.com>
@christianeu-db
christianeu-db marked this pull request as draft September 3, 2026 20:20
@christianeu-db christianeu-db changed the title Databricks converter: round-trip measure display_name (#326) fix(Databricks): round-trip display_name on measures (#326) Sep 3, 2026
@Haoranli503

Copy link
Copy Markdown
Contributor

lgtm to unblocking customers before #333 lands. It's a simple fix, @jbonofre can you help tal?

Co-authored-by: Isaac <no-reply@databricks.com>
@christianeu-db
christianeu-db marked this pull request as ready for review September 3, 2026 20:32
@jbonofre
jbonofre self-requested a review September 3, 2026 23:14
@jbonofre

jbonofre commented Sep 3, 2026

Copy link
Copy Markdown
Member

Good catch! Thanks!

@jbonofre
jbonofre merged commit ddb19f1 into apache:main Sep 3, 2026
4 checks passed
Haoranli503 added a commit to Haoranli503/ossie_databricks that referenced this pull request Sep 4, 2026
…g tables

Upstream apache#356 clarified the mapping table (a measure's display_name has no
`label` on the Apache Ossie metric shape, so it rides in the DATABRICKS stash).
The converter restructure turned the top-level README into a short pointer, so
carry that clarification into the mapping tables now in python/README.md and
java/README.md. Both converters stash a measure's display_name (Python via apache#356,
Java via the measure display_name round-trip commit), so the tables match the
behavior.

Co-authored-by: Isaac <no-reply@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.

Databricks converter drops display_name on measures during round-trip

3 participants