Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-22949

Sql. Add for-loop support to SQL logic tests.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • sql

    Description

      In order to simplify tests in the SQLLogic test suite, we can add parameterisation support via for loops (iteration over sequence of values).

      In addition to that we can also replace placeholders in expected results (at the moment replacement is only done for a query string):

      # Single value
      
      for k in [1, 2, 3, 4]
      query T
      SELECT ${k}
      ----
      ${k}
      
      endfor
      
      

      We can also escape a comma symbol so it possible to use `DECIMAL(p,s)` in tests:

      for k in [ DECIMAL(4), DECIMAL(4\,1) ]
      
      statement ok
      SELECT 1::${type}
      
      endfor
      

      Attachments

        Issue Links

          Activity

            People

              mzhuravkov Maksim Zhuravkov
              mzhuravkov Maksim Zhuravkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m