Akash3121 commented on code in PR #11028:
URL: https://github.com/apache/paimon/pull/11028#discussion_r4508109433
##########
paimon-python/pypaimon/schema/schema_manager.py:
##########
@@ -747,6 +747,30 @@ def _validate_primary_key_blob_fields(
)
+def _duplicates(names: List[str]) -> List[str]:
Review Comment:
Nit: This function implements duplicate detection with `names.count(name)`
for every element, making every valid create-table check O(n²). A 10,000 column
list took about 1.13 seconds locally. A one-pass `set` / `Counter`
implementation would preserve the sorted error output without penalizing wide
schemas; this can be addressed before merge or as a small follow-up.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]