Skip to content

dialect(duckdb): fixes, tested with the DuckDB CLI in Docker - #100

Closed
dbulahov wants to merge 0 commit into
eclipse-daanse:mainfrom
dbulahov:main241126_1
Closed

dbulahov wants to merge 0 commit into
eclipse-daanse:mainfrom
dbulahov:main241126_1

Conversation

@dbulahov

Copy link
Copy Markdown
Contributor

What does this PR do?

DuckDB is embedded and serves no connection: the tests run the CLI of
each version in Docker (duckdb/duckdb 1.0.0 to 2.0.1) on the SQL the
dialect writes, the dialect built for the version the CLI reports.

DuckDbDialect:

  • generateListAgg: DISTINCT kept with an order by the value itself, was
    left out with any ORDER BY; a quote in the separator doubled, broke
    the statement; " ORDER BY" spaced, was "nameORDER BY" without one
  • generatePercentileDisc/Cont: PERCENTILE_DISC/CONT(p) WITHIN GROUP
    (ORDER BY col [DESC]); quantile_disc/cont(col, p) took no order, so a
    descending percentile came out ascending
  • supportsNthValueIgnoreNulls: true, the list is filtered with
    FILTER (WHERE v IS NOT NULL); was false

pom: testcontainers junit-jupiter (test), DOCKER_HOST for surefire

Container tests:

  • DuckDbCli: runs the CLI of a tag, files put into the container, the
    version checked against the tag; an error counts by stderr too, the
    CLI of 1.2.0 to 1.2.2 exits with 0 on one
  • DuckDbGroupingSetsTest: GROUPING SETS, ROLLUP, CUBE, GROUPING()
  • DuckDbListAggTest: STRING_AGG ordered, DISTINCT, separators, NULLS
    FIRST/LAST, per group; DISTINCT by another column refused by DuckDB
  • DuckDbPercentileTest: PERCENTILE_DISC/CONT ascending, descending, at
    the ends, per group
  • DuckDbNthValueContainerTest: n-th value counting or leaving out
    NULLs, past the end, n below 1, order, per group
  • DuckDbBitAggregationTest: AND, OR, XOR, NAND, NOR, NXOR on INTEGER
    and BIGINT past 32 bits, per group, NULLs alone
  • DuckDbRenameTest: table and column renamed, refused with an index
    (Dependency Error); no index or constraint rename
  • DuckDbAddConstraintTest: unique, check and foreign key in CREATE
    TABLE, enforced; ALTER TABLE ADD refused, ADD UNIQUE from 2.0 only
    while no table refers to it
  • DuckDbBulkLoadTest: read_csv of the importer's files, values kept as
    written, delimiters, quotes, NULL literals, skip lines, defaults, a
    large file; a # line left out from 1.1, refused by 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants