cmdecker95 opened a new pull request, #1932: URL: https://github.com/apache/iceberg-python/pull/1932
<!-- Thanks for opening a pull request! --> <!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. --> <!-- Closes #${GITHUB_ISSUE_ID} --> # Rationale for this change This PR enhances type handling capabilities in PyIceberg by extending the `handle_primitive_type` method to support parsing complex types from string literals. The changes allow users to define and work with `list`, `map`, `fixed`, and `decimal` types using a more intuitive string-based syntax, improving the developer experience when working with PyIceberg schemas. # Are these changes tested? Yes, comprehensive tests have been added in `tests/test_types.py` with a new `test_string_based_types` function that validates: - Parsing of primitive types from strings - Correct handling of decimal types with precision and scale parameters - Support for list types with various element types - Map type parsing with proper key-value type definitions - Nested complex types (e.g., maps within maps) - Integration with `NestedField` objects The test suite ensures all new functionality works as expected and maintains compatibility with existing code. # Are there any user-facing changes? Yes, this PR introduces user-facing improvements: - Users can now define complex types using string literals (e.g., `list<string>`, `map<string, int>`) - More intuitive syntax for decimal and fixed types - Better error messages for invalid type definitions These changes enhance the schema definition experience in PyIceberg applications. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org