mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
Note: We now skip a test because we can't pass it but fixing it is presently beyond my understanding. In parser_test.go, we skip SELECT * FROM X INNER JOIN Y ON true INNER JOIN Z ON false because if we stringify it, we put the "ON true" in the wrong place, and end up with something we can't parse. The main change here is modifying AssertParseStatement and AssertStatementStringer (and the corresponding Expression functions) to also verify that they can clone and round-trip, and that we can walk expressions. This gives us a ton more coverage of Clone and conversions to string, and caught a number of subtle typos and missing type switch cases. Some of the changes are mostly cosmetic, such as only including optional words when stringifying expressions or statements if those optional words were present originally, as shown by the Pos value stored for those words. We also drop a lot of trailing apostrophes from some of the parse test cases, which appear to be harmless but won't be reproduced when converting back to strings. We also add a number of additional test cases, or add clauses to existing test cases, to improve coverage of a lot of error testing. For instance, we added a decimal field to the tests of show table, and added cases using KEYPARTITIONS. (Although it doesn't *do* anything.) Similarly, whenever we create a statement, we check the behavior of requesting a list of sources from it, to verify that source finding code at least runs. |
||
|---|---|---|
| .. | ||
| ast.go | ||
| ast_test.go | ||
| astdatatype.go | ||
| parser.go | ||
| parser_test.go | ||
| scanner.go | ||
| scanner_test.go | ||
| token.go | ||
| token_test.go | ||
| walk.go | ||