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

Maksim Zhuravkov updated IGNITE-22949:
--------------------------------------
    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):
{noformat}
# Single value

for k 1 2 3 4
query T
SELECT ${k}
----
${k}
end

# Multiple values per iteration

for a, b, r (1, 2, 3) (2, 3, 5) (3, 4, 7)
query T
SELECT ${a} + ${b}
----
${r}
end
{noformat}

  was:
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):
{noformat}
# Single value

for k 1 2 3 4
query T
SELECT ${k}
----
${k}

# Multiple values per iteration

for a, b, r (1, 2, 3) (2, 3, 5) (3, 4, 7)
query T
SELECT ${a} + ${b}
----
${r}
{noformat}


> Sql. Add for-loop support to SQL logic tests.
> ---------------------------------------------
>
>                 Key: IGNITE-22949
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22949
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Maksim Zhuravkov
>            Priority: Minor
>              Labels: ignite-3
>
> 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):
> {noformat}
> # Single value
> for k 1 2 3 4
> query T
> SELECT ${k}
> ----
> ${k}
> end
> # Multiple values per iteration
> for a, b, r (1, 2, 3) (2, 3, 5) (3, 4, 7)
> query T
> SELECT ${a} + ${b}
> ----
> ${r}
> end
> {noformat}



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

Reply via email to