Feng Jin created FLINK-35230: -------------------------------- Summary: Split FlinkSqlParserImplTest to reduce the code lines. Key: FLINK-35230 URL: https://issues.apache.org/jira/browse/FLINK-35230 Project: Flink Issue Type: Technical Debt Components: Table SQL / Planner Reporter: Feng Jin
With the increasing extension of Calcite syntax, the current FlinkSqlParserImplTest has reached nearly 3000 lines of code. If it exceeds the current limit, it will result in errors in the code style check. {code:log} 08:33:19.679 [ERROR] src/test/java/org/apache/flink/sql/parser/FlinkSqlParserImplTest.java:[1] (sizes) FileLength: File length is 3,166 lines (max allowed is 3,100). {code} To facilitate future syntax extensions, I suggest that we split FlinkSqlParserImplTest and place the same type of syntax in separate Java tests for the convenience of avoiding the continuous growth of the original test class. My current idea is: Since *FlinkSqlParserImplTest* currently inherits *SqlParserTest*, and *SqlParserTest* itself contains many unit tests, for the convenience of future test splits, we should introduce a basic *ParserTestBase* inheriting *SqlParserTest*, and disable the original related unit tests in *SqlParserTest*. This will facilitate writing relevant unit tests more quickly during subsequent splitting, without the need to repeatedly execute the unit tests inside SqlParserTest. -- This message was sent by Atlassian Jira (v8.20.10#820010)