zhengruifeng commented on code in PR #42828: URL: https://github.com/apache/spark/pull/42828#discussion_r1338278235
########## python/pyspark/sql/tests/test_dataframe.py: ########## @@ -63,6 +62,51 @@ class DataFrameTestsMixin: + def test_getitem_invalid_indices(self): + df = self.spark.sql( + "SELECT * FROM VALUES " + "(1, 1.1, 'a'), " + "(2, 2.2, 'b'), " + "(4, 4.4, 'c') " + "AS TAB(a, b, c)" + ) + + # accepted type and values + for index in [False, True, 0, 1, 2, -1, -2, -3]: + df[index] Review Comment: have offline discussion with wenchen, will fix it by switching to `SortOrder(Literal(index))`. Will fix it next week. -- 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]
