Skip to content

Commit a2478af

Browse files
committed
Fix property field size counting by counting delimiter too
1 parent 90a247f commit a2478af

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

airbyte_cdk/sources/declarative/requesters/query_properties/property_chunking.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ def get_request_property_chunks(
5252
chunk_size = 0
5353
for property_field in property_fields:
5454
# If property_limit_type is not defined, we default to property_count which is just an incrementing count
55+
# +2 for the comma ToDo: Add possibility to specify parameter representation and take it into account in property_field_size
5556
property_field_size = (
56-
len(property_field)
57+
len(property_field) + 2
5758
if self.property_limit_type == PropertyLimitType.characters
5859
else 1
5960
)

unit_tests/sources/declarative/requesters/query_properties/test_property_chunking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
None,
4545
PropertyLimitType.characters,
4646
10,
47-
[["kate", "laurie"], ["jaclyn"]],
47+
[["kate"], ["laurie"], ["jaclyn"]],
4848
id="test_property_chunking_limit_characters",
4949
),
5050
pytest.param(

0 commit comments

Comments
 (0)