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

Use default_factory in recon_config.py #431

Merged
merged 1 commit into from
Jun 5, 2024
Merged
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
8 changes: 4 additions & 4 deletions src/databricks/labs/remorph/reconcile/recon_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging
from collections.abc import Callable
from dataclasses import dataclass
from dataclasses import dataclass, field

from pyspark.sql import DataFrame
from sqlglot import Dialect
Expand Down Expand Up @@ -209,10 +209,10 @@ class DataReconcileOutput:
mismatch_count: int = 0
missing_in_src_count: int = 0
missing_in_tgt_count: int = 0
mismatch: MismatchOutput = MismatchOutput()
mismatch: MismatchOutput = field(default_factory=MismatchOutput)
missing_in_src: DataFrame | None = None
missing_in_tgt: DataFrame | None = None
threshold_output: ThresholdOutput = ThresholdOutput()
threshold_output: ThresholdOutput = field(default_factory=ThresholdOutput)
exception: str | None = None


Expand Down Expand Up @@ -255,7 +255,7 @@ class StatusOutput:
class ReconcileTableOutput:
target_table_name: str
source_table_name: str
status: StatusOutput = StatusOutput()
status: StatusOutput = field(default_factory=StatusOutput)
exception_message: str | None = None


Expand Down