Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for cellFormat in TableV1ColumnEncoding #299

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/databricks/labs/lsql/lakeview/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,7 @@ class TableV1ColumnEncoding:
preserve_whitespace: bool | None = None
use_monospace_font: bool | None = None
visible: bool | None = None
cellFormat: dict | None = None

def as_dict(self) -> Json:
body: Json = {}
Expand Down Expand Up @@ -1611,6 +1612,8 @@ def as_dict(self) -> Json:
body["useMonospaceFont"] = self.use_monospace_font
if self.visible is not None:
body["visible"] = self.visible
if self.cellFormat:
body["cellFormat"] = self.cellFormat
return body

@classmethod
Expand Down Expand Up @@ -1643,6 +1646,7 @@ def from_dict(cls, d: Json) -> TableV1ColumnEncoding:
type=_enum(d, "type", ColumnType),
use_monospace_font=d.get("useMonospaceFont", None),
visible=d.get("visible", None),
cellFormat=d.get("cellFormat", None),
)


Expand Down
Loading