RussellSpitzer commented on code in PR #12117: URL: https://github.com/apache/iceberg/pull/12117#discussion_r1989620464
########## spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestSystemFunctionPushDownDQL.java: ########## @@ -84,20 +84,24 @@ public void removeTables() { @TestTemplate public void testYearsFunctionOnUnpartitionedTable() { createUnpartitionedTable(spark, tableName); - testYearsFunction(false); + testYearsFunction(false, false); + testYearsFunction(false, true); } @TestTemplate public void testYearsFunctionOnPartitionedTable() { createPartitionedTable(spark, tableName, "years(ts)"); - testYearsFunction(true); + testYearsFunction(true, false); + testYearsFunction(true, true); } - private void testYearsFunction(boolean partitioned) { + private void testYearsFunction(boolean partitioned, boolean singular) { Review Comment: I would recommend against adding a new parameter here. We are making the function a bit more confusing, (it's already unlcear that the first "true/false" means partitioned. Instead I would recommend just iterating over each version of the function or duplicating the tests. Ideally this is where we would add another parameterization to the tests themselves but since we are using @TestTemplate that won't be possible. Tldr; for year_func in {year, years} { test } Is what I would recommend instead of Test(true, false) Test(true, true) -- 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