Skip to content

Commit 69f1419

Browse files
committed
Nailing the output
1 parent 3d13495 commit 69f1419

File tree

4 files changed

+2018
-91
lines changed

4 files changed

+2018
-91
lines changed

README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Testing SQL compabillity for [AlaSQL](https://github.com/agershun/alasql)
66
How?
77
----
88

9-
Go get markdown summery run the npm test;
9+
Go get markdown summery run the npm test;
1010

1111
npm test
1212

@@ -15,7 +15,7 @@ Result will output to results.md
1515
To get more details execute `run_raw.js` in the sqllogic folder. As the output is very big its suggested to direct output to a file. As the testfiles are quite big the garbagecollection can be initiated between the run of each file. To initiate this run node with the --expose-gc flag
1616

1717
cd sqllogic
18-
node --expose-gc run_raw > results.log
18+
node --expose-gc run_raw > results.log
1919

2020

2121
What?
@@ -27,9 +27,9 @@ There are about 2 million tests in the full test suite. Many of the tests will t
2727

2828
Please note that the current version of the script **ONLY TESTS IF THE SQL CAN COMPILE** - not if the returned values are correct.
2929

30-
To make sure you are testing the lates stable release please run the following:
30+
To make sure you are testing the lates stable release please run the following:
3131

32-
cd sqllogic && npm install alasql
32+
cd sqllogic && npm install alasql
3333

3434
Please see the config section of the `run` files to run tests on local version instead of npm version.
3535

@@ -52,7 +52,23 @@ ToDo
5252
----
5353

5454
- Verify that the parser parses all the tests (ongoing development in the sqllogivtestparserV2.js)
55-
- Implement verification of returned results.
55+
56+
- Implement verification of returned valued with sortorder set
57+
58+
- Change the compabillity flags in alasql accordng to whats mimicked
59+
60+
- implement:
61+
> The <label> argument is also optional. If included, sqllogictest stores a hash of the results of this query under the given label. If the label is reused, then sqllogictest verifies that the results are the same. This can be used to verify that two or more queries in the same test script that are logically equivalent always generate the same output.
62+
63+
- Implement:
64+
> Floating point values are rendered as if by printf("%.3f").
65+
66+
- Implement:
67+
> NULL values are rendered as "NULL". Empty strings are rendered as "(empty)". Within non-empty strings, all control characters and unprintable characters are rendered as "@".
68+
69+
70+
- Implement
71+
> The <sort-mode> argument is optional. If included, it must be one of "nosort", "rowsort", or "valuesort". The default is "nosort". In nosort mode, the results appear in exactly the order in which they were received from the database engine. The nosort mode should only be used on queries that have an ORDER BY clause or which only have a single row of result, since otherwise the order of results is undefined and might vary from one database engine to another. The "rowsort" mode gathers all output from the database engine then sorts it by rows on the client side. Sort comparisons use strcmp() on the rendered ASCII text representation of the values. Hence, "9" sorts after "10", not before. The "valuesort" mode works like rowsort except that it does not honor row groupings. Each individual result value is sorted on its own.
5672
5773
**Not ToDo**
5874
- Impelment mocha testframework (testresults does not get printed before all are done - so fills the memory)
@@ -69,9 +85,9 @@ The output from run.js is structured the following way:
6985
- Listing path to each testfile to be used
7086
- For each test file
7187
- Name of the test file that is about to run
72-
- If errors occure the original SQL triggering the error is printed followed by the javascript error description.
88+
- If errors occure the original SQL triggering the error is printed followed by the javascript error description.
7389
- Summery of error rate in this test file and time consumption
74-
- Summery of error rate for all test file
90+
- Summery of error rate for all test file
7591
- Note stating: "ALL TESTS COPMLETED"
7692

7793
The output from a single testfile could look like this
@@ -97,7 +113,5 @@ It makes sense, as no errors was found. But it can also look like this:
97113
./test/evidence/slt_lang_update.test: 98ms
98114

99115
-----------------------------
100-
101-
That makes less sense as an error was found but was not printed. Because there are about 2 million tests in the full test set the same errors will be found many times. That is why an error only gets printed first time its seen. Settings for printing errors can be found in the config section of run.js
102-
103116

117+
making less sense as an error was found but was not printed. Because there are about 2 million tests in the full testset the same errors will be found many times. To limit noise an error only gets printed first time its seen. Settings for printing errors can be found in the config section of run_x.js

0 commit comments

Comments
 (0)