@@ -62,6 +62,8 @@ def diff_tables(
62
62
max_threadpool_size : Optional [int ] = 1 ,
63
63
# Algorithm
64
64
algorithm : Algorithm = Algorithm .AUTO ,
65
+ # An additional 'where' expression to restrict the search space.
66
+ where : str = None ,
65
67
# Into how many segments to bisect per iteration (hashdiff only)
66
68
bisection_factor : int = DEFAULT_BISECTION_FACTOR ,
67
69
# When should we stop bisecting and compare locally (in row count; hashdiff only)
@@ -92,6 +94,7 @@ def diff_tables(
92
94
max_threadpool_size (int): Maximum size of each threadpool. ``None`` means auto.
93
95
Only relevant when `threaded` is ``True``.
94
96
There may be many pools, so number of actual threads can be a lot higher.
97
+ where (str, optional): An additional 'where' expression to restrict the search space.
95
98
algorithm (:class:`Algorithm`): Which diffing algorithm to use (`HASHDIFF` or `JOINDIFF`. Default=`AUTO`)
96
99
bisection_factor (int): Into how many segments to bisect per iteration. (Used when algorithm is `HASHDIFF`)
97
100
bisection_threshold (Number): Minimal row count of segment to bisect, otherwise download
@@ -106,7 +109,7 @@ def diff_tables(
106
109
107
110
Note:
108
111
The following parameters are used to override the corresponding attributes of the given :class:`TableSegment` instances:
109
- `key_columns`, `update_column`, `extra_columns`, `min_key`, `max_key`.
112
+ `key_columns`, `update_column`, `extra_columns`, `min_key`, `max_key`, `where` .
110
113
If different values are needed per table, it's possible to omit them here, and instead set
111
114
them directly when creating each :class:`TableSegment`.
112
115
@@ -135,6 +138,7 @@ def diff_tables(
135
138
max_key = max_key ,
136
139
min_update = min_update ,
137
140
max_update = max_update ,
141
+ where = where ,
138
142
).items ()
139
143
if v is not None
140
144
}
0 commit comments