Skip to content

Commit ca3ab9e

Browse files
output consistency: remove string_agg and array_agg without ordering (#29446)
1 parent 27ae3d8 commit ca3ab9e

File tree

4 files changed

+0
-39
lines changed

4 files changed

+0
-39
lines changed

misc/python/materialize/output_consistency/ignore_filter/internal_output_inconsistency_ignore_filter.py

-8
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
)
4040
from materialize.output_consistency.operation.operation import (
4141
DbFunction,
42-
DbFunctionWithCustomPattern,
4342
DbOperation,
4443
DbOperationOrFunction,
4544
)
@@ -112,13 +111,6 @@ def _matches_problematic_function_invocation(
112111
):
113112
return YesIgnore("#15186")
114113

115-
if db_function.function_name_in_lower_case in {
116-
"array_agg",
117-
"string_agg",
118-
} and not isinstance(db_function, DbFunctionWithCustomPattern):
119-
# The unordered variants are to be ignored.
120-
return YesIgnore("#19832")
121-
122114
return NoIgnore()
123115

124116
def _matches_problematic_operation_invocation(

misc/python/materialize/output_consistency/input_data/operations/aggregate_operations_provider.py

-12
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,6 @@
145145
),
146146
)
147147

148-
AGGREGATE_OPERATION_TYPES.append(
149-
DbFunction(
150-
"string_agg",
151-
[StringOperationParam(), StringOperationParam()],
152-
StringReturnTypeSpec(),
153-
is_aggregation=True,
154-
relevance=OperationRelevance.LOW,
155-
comment="without ordering",
156-
),
157-
)
158-
159148
AGGREGATE_OPERATION_TYPES.append(
160149
DbFunctionWithCustomPattern(
161150
"string_agg",
@@ -168,6 +157,5 @@
168157
StringReturnTypeSpec(),
169158
is_aggregation=True,
170159
relevance=OperationRelevance.LOW,
171-
comment="with ordering",
172160
),
173161
)

misc/python/materialize/output_consistency/input_data/operations/array_operations_provider.py

-10
Original file line numberDiff line numberDiff line change
@@ -169,23 +169,13 @@
169169
BooleanReturnTypeSpec(),
170170
)
171171
)
172-
ARRAY_OPERATION_TYPES.append(
173-
DbFunction(
174-
"array_agg",
175-
[AnyOperationParam()],
176-
ArrayReturnTypeSpec(array_value_type_category=DataTypeCategory.DYNAMIC),
177-
is_aggregation=True,
178-
comment="without ordering",
179-
),
180-
)
181172
ARRAY_OPERATION_TYPES.append(
182173
DbFunctionWithCustomPattern(
183174
"array_agg",
184175
{2: "array_agg($ ORDER BY row_index, $)"},
185176
[AnyOperationParam(), SameOperationParam(index_of_previous_param=0)],
186177
ArrayReturnTypeSpec(array_value_type_category=DataTypeCategory.DYNAMIC),
187178
is_aggregation=True,
188-
comment="with ordering",
189179
),
190180
)
191181
ARRAY_OPERATION_TYPES.append(

misc/python/materialize/postgres_consistency/ignore_filter/pg_inconsistency_ignore_filter.py

-9
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,6 @@ def _matches_problematic_function_invocation(
232232
expression: ExpressionWithArgs,
233233
all_involved_characteristics: set[ExpressionCharacteristics],
234234
) -> IgnoreVerdict:
235-
inconsistent_value_ordering_functions = ["array_agg", "string_agg"]
236-
if (
237-
db_function.function_name_in_lower_case
238-
in inconsistent_value_ordering_functions
239-
# only exclude unordered variant
240-
and "ORDER BY" not in db_function.to_pattern(db_function.max_param_count)
241-
):
242-
return YesIgnore("inconsistent ordering, not an error")
243-
244235
if db_function.function_name_in_lower_case == "jsonb_pretty":
245236
return YesIgnore("Accepted")
246237

0 commit comments

Comments
 (0)