Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-35230

Split FlinkSqlParserImplTest to reduce the code lines.

    XMLWordPrintableJSON

Details

    • Technical Debt
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Table SQL / API
    • 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.

       

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            hackergin Feng Jin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: