[
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 in [1, 2, 3, 4]
query T
SELECT ${k}
----
${k}
endfor
{noformat}
We can also escape a comma symbol so it possible to use `DECIMAL(p,s)` in tests:
{noformat}
for k in [ DECIMAL(4), DECIMAL(4\,1) ]
statement ok
SELECT 1::${type}
endfor
{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 in [1, 2, 3, 4]
query T
SELECT ${k}
----
${k}
endfor
{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
> Assignee: Maksim Zhuravkov
> Priority: Minor
> Labels: ignite-3
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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 in [1, 2, 3, 4]
> query T
> SELECT ${k}
> ----
> ${k}
> endfor
> {noformat}
> We can also escape a comma symbol so it possible to use `DECIMAL(p,s)` in
> tests:
> {noformat}
> for k in [ DECIMAL(4), DECIMAL(4\,1) ]
> statement ok
> SELECT 1::${type}
> endfor
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)