Skip to content

Commit 4baea98

Browse files
committed
Fix attribute handling for Constraint
1 parent 5640a04 commit 4baea98

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ All notable changes to the Databricks Labs Data Generator will be documented in
66
### unreleased
77

88
#### Fixed
9-
* Updated build scripts to use Ubuntu 22.04 to correspond to environment in Databricks runtime
109
* Refactored `DataAnalyzer` and `BasicStockTickerProvider` to comply with ANSI SQL standards
1110
* Removed internal modification of `SparkSession`
11+
* Updated `Constraint` to treat `_filterExpression` and `_calculatedFilterExpression` as instance variables
1212

1313
#### Changed
14+
* Added type hints for modules and classes
1415
* Changed base Databricks runtime version to DBR 13.3 LTS (based on Apache Spark 3.4.1) - minimum supported version
1516
of Python is now 3.10.12
1617
* Updated build tooling to use [hatch](https://hatch.pypa.io/latest/)
@@ -23,6 +24,7 @@ All notable changes to the Databricks Labs Data Generator will be documented in
2324
#### Added
2425
* Added support for serialization to/from JSON format
2526
* Added Ruff and mypy tooling
27+
* Added `OutputDataset` class and the ability to save a `DataGenerator` to an output table or files
2628

2729

2830
### Version 0.4.0 Hotfix 2

dbldatagen/constraints/constraint.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ class Constraint(SerializableToDict, ABC):
2828
"""
2929

3030
SUPPORTED_OPERATORS: ClassVar[list[str]] = ["<", ">", ">=", "!=", "==", "=", "<=", "<>"]
31-
_filterExpression: Column | None = None
32-
_calculatedFilterExpression: bool = False
33-
_supportsStreaming: bool = False
3431

3532
def __init__(self, supportsStreaming: bool = False) -> None:
3633
self._supportsStreaming = supportsStreaming
34+
self._filterExpression: Column | None = None
35+
self._calculatedFilterExpression: bool = False
3736

3837
@staticmethod
3938
def _columnsFromListOrString(

0 commit comments

Comments
 (0)