[ 
https://issues.apache.org/jira/browse/FLINK-35230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feng Jin updated FLINK-35230:
-----------------------------
    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.
{code}
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).
{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.

 

https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=59113&view=logs&j=52b61abe-a3cc-5bde-cc35-1bbe89bb7df5&t=54421a62-0c80-5aad-3319-094ff69180bb

  was:
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.





> 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
>            Priority: Major
>
> 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}
> 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).
> {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.
>  
> https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=59113&view=logs&j=52b61abe-a3cc-5bde-cc35-1bbe89bb7df5&t=54421a62-0c80-5aad-3319-094ff69180bb



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to