nuno-faria commented on code in PR #1587:
URL: 
https://github.com/apache/datafusion-python/pull/1587#discussion_r3407825478


##########
python/tests/test_functions.py:
##########
@@ -2160,16 +2161,51 @@ def test_date_part_native_str(self):
         ctx = SessionContext()
         df = ctx.from_pydict({"a": ["2021-07-15T00:00:00"]})
         df = df.select(f.to_timestamp(column("a")).alias("a"))
-        result = df.select(f.date_part("year", 
column("a")).alias("y")).collect()
+        with warnings.catch_warnings():
+            warnings.simplefilter("error", DeprecationWarning)
+            result = df.select(f.date_part("year", 
column("a")).alias("y")).collect()

Review Comment:
   I think computing the dataframe is fine to validate the result, was just 
wondering about the warning code since it will never return in this case. But 
it's also fine to leave as is.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to