timsaucer commented on code in PR #1154:
URL: 
https://github.com/apache/datafusion-python/pull/1154#discussion_r2151950377


##########
python/datafusion/context.py:
##########
@@ -535,7 +535,7 @@ def register_listing_table(
         self,
         name: str,
         path: str | pathlib.Path,
-        table_partition_cols: list[tuple[str, str]] | None = None,
+        table_partition_cols: list[tuple[str, pa.DataType]] | None = None,

Review Comment:
   To avoid a breaking change, we could make the type hint
   
   ```
   table_partition_cols: list[tuple[str, pa.DataType]] | list[tuple[str, str]] 
| None = None
   ```
   
   And then in the python code just below we can do type checking of the 
`table_partition_cols` and coerce to pyarrow data type. *Alternatively* we 
could overload the method signature and mark the old one as deprecated for a 
couple of releases. Either way we could avoid a breaking change without giving 
users the opportunity to upgrade at their schedule.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to