Skip to content

Add FieldMask class and helper functions#1041

Merged
hectorcast-db merged 10 commits into
mainfrom
hectorcast-db/field-mask
Oct 8, 2025
Merged

Add FieldMask class and helper functions#1041
hectorcast-db merged 10 commits into
mainfrom
hectorcast-db/field-mask

Conversation

@hectorcast-db

@hectorcast-db hectorcast-db commented Sep 10, 2025

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Add FieldMask class and helper functions.

This class methods have the same signature than the google.protobuf.FieldMask
https://github.com/protocolbuffers/protobuf/blob/main/python/google/protobuf/internal/field_mask.py#L18
but serialize the FieldMask using snake_case, as expected by Databricks server.

Helper functions are required because serialization framework in templates only supports single line code.

Version Pin

  1. Why >=4.21.0:
    Stability: Version 4.21.0 was a stable release that introduced important performance improvements and API stabilization
    Python 3.7+ compatibility.

  2. Why <7.0:
    Major version boundary: Avoid future breaking changes.

How is this tested?

Added unit tests.

NO_CHANGELOG=true

@hectorcast-db hectorcast-db changed the title Add FieldMask class Add FieldMask class and helper functions Sep 15, 2025
Comment thread tests/test_fieldmask.py Outdated

@Divyansh-db Divyansh-db left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, Can you also get an approval from Parth or Omer

Comment thread databricks/sdk/common/types/fieldmask.py Outdated
Comment thread databricks/sdk/common/types/fieldmask.py Outdated
Comment thread databricks/sdk/service/_internal.py
Comment thread databricks/sdk/service/_internal.py
Comment thread tests/test_internal.py Outdated
Comment thread tests/test_internal.py Outdated
Comment thread tests/test_internal.py Outdated
Comment thread tests/test_internal.py Outdated
Comment thread tests/test_internal.py Outdated

@parthban-db parthban-db left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM modulo nit.

Comment thread tests/test_internal.py Outdated
@github-actions

github-actions Bot commented Oct 7, 2025

Copy link
Copy Markdown

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 1041
  • Commit SHA: 478e43957b788ad75f6fdec712d454a406077e0b

Checks will be approved automatically on success.

@hectorcast-db hectorcast-db added this pull request to the merge queue Oct 8, 2025
Merged via the queue into main with commit 156ec40 Oct 8, 2025
17 checks passed
@hectorcast-db hectorcast-db deleted the hectorcast-db/field-mask branch October 8, 2025 09:03
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