Details
-
Technical Debt
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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.
Unable to find source-code formatter for language: log. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml08: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).
To facilitate future syntax extends, 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.