Actually fixed group by and order by collation

This commit is contained in:
pedrocarlo 2025-04-20 03:53:44 -03:00
parent 0df6c87f07
commit bf1fe9e0b3
10 changed files with 118 additions and 11 deletions

View file

@ -81,11 +81,23 @@ class CollateTest(BaseModel):
)
limbo.run_test(
" Grouping is performed using the NOCASE collating sequence (Values 'abc', 'ABC', and 'Abc' are placed in the same group).",
"Grouping is performed using the NOCASE collating sequence (Values 'abc', 'ABC', and 'Abc' are placed in the same group).",
"SELECT count(*) FROM t1 GROUP BY d ORDER BY 1;",
"\n".join(map(lambda x: str(x), [4])),
)
limbo.run_test(
"Grouping is performed using the BINARY collating sequence. 'abc' and 'ABC' and 'Abc' form different groups",
"SELECT count(*) FROM t1 GROUP BY (d || '') ORDER BY 1;",
"\n".join(map(lambda x: str(x), [1, 1, 2])),
)
limbo.run_test(
"Sorting or column c is performed using the RTRIM collating sequence.",
"SELECT x FROM t1 ORDER BY c, x;",
"\n".join(map(lambda x: str(x), [4, 1, 2, 3])),
)
def cleanup(db_fullpath: str):
wal_path = f"{db_fullpath}-wal"