Skip to content

Conversation

elianddb
Copy link
Contributor

@elianddb elianddb commented Jul 9, 2025

Fixes dolthub/go-mysql-server#3055
Update COPY commands to explicitly specify column names to fix compatibility with GMS fix that correctly rejects empty INSERT VALUES when no defaults exist.
All COPY tests now pass with the updated GMS behavior.

Copy link
Contributor

github-actions bot commented Jul 9, 2025

Main PR
covering_index_scan_postgres 343.16/s 348.88/s +1.6%
index_join_postgres 156.98/s 156.97/s -0.1%
index_join_scan_postgres 188.21/s 187.82/s -0.3%
index_scan_postgres 12.40/s 12.41/s 0.0%
oltp_point_select 2519.34/s 2532.07/s +0.5%
oltp_read_only 1816.70/s 1824.55/s +0.4%
select_random_points 115.04/s 117.14/s +1.8%
select_random_ranges 132.06/s 130.78/s -1.0%
table_scan_postgres 11.69/s 11.82/s +1.1%
types_table_scan_postgres 5.39/s 5.45/s +1.1%

Copy link
Contributor

github-actions bot commented Jul 9, 2025

Main PR
Total 42090 42090
Successful 16646 16443
Failures 25444 25647
Partial Successes1 5539 5530
Main PR
Successful 39.5486% 39.0663%
Failures 60.4514% 60.9337%

${\color{red}Regressions (191)}$

aggregates

QUERY:          COPY aggtest FROM '/home/runner/work/doltgresql/doltgresql/testing/go/regression/data/agg.data';
RECEIVED ERROR: Field 'a' doesn't have a default value
QUERY:          SELECT avg(b)::numeric(10,3) AS avg_107_943 FROM aggtest;
RECEIVED ERROR: row sets differ:
    Postgres:
        {"107.943"}
    Doltgres:
        {�}
QUERY:          SELECT max(four) AS max_3 FROM onek;
RECEIVED ERROR: row sets differ:
    Postgres:
        {3}
    Doltgres:
        {�}
QUERY:          SELECT max(a) AS max_100 FROM aggtest;
RECEIVED ERROR: row sets differ:
    Postgres:
        {100}
    Doltgres:
        {�}
QUERY:          SELECT max(aggtest.b) AS max_324_78 FROM aggtest;
RECEIVED ERROR: row sets differ:
    Postgres:
        {324.779999}
    Doltgres:
        {�}
QUERY:          SELECT count(four) AS cnt_1000 FROM onek;
RECEIVED ERROR: row sets differ:
    Postgres:
        {1000}
    Doltgres:
        {0}
QUERY:          SELECT count(DISTINCT four) AS cnt_4 FROM onek;
RECEIVED ERROR: row sets differ:
    Postgres:
        {4}
    Doltgres:
        {0}
QUERY:          select min(unique1) from tenk1;
RECEIVED ERROR: row sets differ:
    Postgres:
        {0}
    Doltgres:
        {�}
QUERY:          select max(unique1) from tenk1;
RECEIVED ERROR: row sets differ:
    Postgres:
        {9999}
    Doltgres:
        {�}
QUERY:          select max(unique1) from tenk1 where unique1 < 42;
RECEIVED ERROR: row sets differ:
    Postgres:
        {41}
    Doltgres:
        {�}
QUERY:          select max(unique1) from tenk1 where unique1 > 42;
RECEIVED ERROR: row sets differ:
    Postgres:
        {9999}
    Doltgres:
        {�}
QUERY:          select max(tenthous) from tenk1 where thousand = 33;
RECEIVED ERROR: row sets differ:
    Postgres:
        {9033}
    Doltgres:
        {�}
QUERY:          select min(tenthous) from tenk1 where thousand = 33;
RECEIVED ERROR: row sets differ:
    Postgres:
        {33}
    Doltgres:
        {�}
QUERY:          select f1, (select min(unique1) from tenk1 where unique1 > f1) AS gt
  from int4_tbl;
RECEIVED ERROR: could not find the following row in the result set:
        {-123456, 0}
QUERY:          select distinct max(unique2) from tenk1;
RECEIVED ERROR: row sets differ:
    Postgres:
        {9999}
    Doltgres:
        {�}
QUERY:          select max(unique2) from tenk1 order by 1;
RECEIVED ERROR: row sets differ:
    Postgres:
        {9999}
    Doltgres:
        {�}
QUERY:          select max(unique2) from tenk1 order by max(unique2);
RECEIVED ERROR: row sets differ:
    Postgres:
        {9999}
    Doltgres:
        {�}
QUERY:          select max(unique2) from tenk1 order by max(unique2)+1;
RECEIVED ERROR: row sets differ:
    Postgres:
        {9999}
    Doltgres:
        {�}
QUERY:          select max(100) from tenk1;
RECEIVED ERROR: row sets differ:
    Postgres:
        {100}
    Doltgres:
        {�}

alter_table

QUERY:          SELECT unique1 FROM tenk1 WHERE unique1 < 5;
RECEIVED ERROR: expected row count 5 but received 0
QUERY:          insert into def_test default values;
RECEIVED ERROR: Field 'c1' doesn't have a default value (errno 1105) (sqlstate HY000)
QUERY:          insert into def_test default values;
RECEIVED ERROR: Field 'c1' doesn't have a default value (errno 1105) (sqlstate HY000)
QUERY:          select * from def_test;
RECEIVED ERROR: expected row count 4 but received 2
QUERY:          select * from attest;
RECEIVED ERROR: expected row count 2 but received 1
QUERY:          select * from attest;
RECEIVED ERROR: expected row count 3 but received 2

arrays

QUERY:          COPY array_op_test FROM '/home/runner/work/doltgresql/doltgresql/testing/go/regression/data/array.data';
RECEIVED ERROR: Field 'seqno' doesn't have a default value
QUERY:          select array_agg(unique1) from (select unique1 from tenk1 where unique1 < 15 order by unique1) ss;
RECEIVED ERROR: row sets differ:
    Postgres:
        {"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]"}
    Doltgres:
        {�}
QUERY:          select array_agg(ten) from (select ten from tenk1 where unique1 < 15 order by unique1) ss;
RECEIVED ERROR: row sets differ:
    Postgres:
        {"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4]"}
    Doltgres:
        {�}
QUERY:          select array_agg(nullif(ten, 4)) from (select ten from tenk1 where unique1 < 15 order by unique1) ss;
RECEIVED ERROR: row sets differ:
    Postgres:
        {"[0, 1, 2, 3, �, 5, 6, 7, 8, 9, 0, 1, 2, 3, �]"}
    Doltgres:
        {�}

btree_index

QUERY:          COPY bt_i4_heap FROM '/home/runner/work/doltgresql/doltgresql/testing/go/regression/data/desc.data';
RECEIVED ERROR: Field 'seqno' doesn't have a default value
QUERY:          COPY bt_name_heap FROM '/home/runner/work/doltgresql/doltgresql/testing/go/regression/data/hash.data';
RECEIVED ERROR: Field 'seqno' doesn't have a default value
QUERY:          COPY bt_txt_heap FROM '/home/runner/work/doltgresql/doltgresql/testing/go/regression/data/desc.data';
RECEIVED ERROR: Field 'seqno' doesn't have a default value
QUERY:          COPY bt_f8_heap FROM '/home/runner/work/doltgresql/doltgresql/testing/go/regression/data/hash.data';
RECEIVED ERROR: Field 'seqno' doesn't have a default value
QUERY:          SELECT b.*
   FROM bt_i4_heap b
   WHERE b.seqno < 1;
RECEIVED ERROR: expected row count 1 but received 0
QUERY:          SELECT b.*
   FROM bt_i4_heap b
   WHERE b.seqno >= 9999;
RECEIVED ERROR: expected row count 1 but received 0
QUERY:          SELECT b.*
   FROM bt_i4_heap b
   WHERE b.seqno = 4500;
RECEIVED ERROR: expected row count 1 but received 0
QUERY:          SELECT b.*
   FROM bt_name_heap b
   WHERE b.seqno < '1'::name;
RECEIVED ERROR: expected row count 1 but received 0
QUERY:          SELECT b.*
   FROM bt_name_heap b
   WHERE b.seqno >= '9999'::name;
RECEIVED ERROR: expected row count 1 but received 0
QUERY:          SELECT b.*
   FROM bt_name_heap b
   WHERE b.seqno = '4500'::name;
RECEIVED ERROR: expected row count 1 but received 0
QUERY:          SELECT b.*
   FROM bt_txt_heap b
   WHERE b.seqno < '1'::text;
RECEIVED ERROR: expected row count 1 but received 0

${\color{lightgreen}Progressions (6)}$

arrays

QUERY: SELECT * FROM array_op_test WHERE i @> '{NULL}' ORDER BY seqno;

create_index

QUERY: SELECT * FROM array_index_op_test WHERE i @> '{NULL}' ORDER BY seqno;

indexing

QUERY: select indexrelid::regclass, indrelid::regclass
  from pg_index where indexrelid::regclass::text like 'idxpart%';

portals

QUERY: SELECT stringu1 FROM onek WHERE stringu1 = 'DZAAAA';

subselect

QUERY: select a.thousand from tenk1 a, tenk1 b
where a.thousand = b.thousand
  and exists ( select 1 from tenk1 c where b.hundred = c.hundred
                   and not exists ( select 1 from tenk1 d
                                    where a.thousand = d.thousand ) );

window

QUERY: SELECT * FROM(
  SELECT count(*) OVER (PARTITION BY four ORDER BY ten) +
    sum(hundred) OVER (PARTITION BY two ORDER BY ten) AS total,
    count(*) OVER (PARTITION BY four ORDER BY ten) AS fourcount,
    sum(hundred) OVER (PARTITION BY two ORDER BY ten) AS twosum
    FROM tenk1
)sub
WHERE total <> fourcount + twosum;

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

@elianddb elianddb requested review from zachmu and removed request for zachmu July 9, 2025 21:41
elianddb and others added 6 commits July 10, 2025 21:51
Update COPY commands to explicitly specify column names to fix integration
test failures caused by GMS PR #3055 which correctly rejects empty INSERT
VALUES when no defaults exist.

Changes:
- Updated 9 COPY commands in copy_test.go to specify columns explicitly
- Fixed read_only_table test to use proper column specification
- All COPY tests now pass with new GMS behavior

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Update expected error message from "number of values does not match number of columns provided"
to "Column count doesn't match value count at row 1" to match the new error message format
introduced by GMS PR #3055.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Update 8 COPY commands in bats test SQL files to explicitly specify
column names to fix compatibility with GMS PR #3055 that correctly
rejects empty INSERT VALUES when no defaults exist.

Files updated:
- csv-load-basic-cases.sql: Add (pk, c1, c2) to COPY tbl1
- csv-load-multi-chunk.sql: Add (pk, c1, c2) to COPY tbl1
- csv-load-with-header.sql: Add (pk, c1, c2) to COPY tbl1
- csv-load-with-legacy-syntax.sql: Add (pk, c1, c2) to COPY tbl1
- csv-load-with-no-tx-control.sql: Add (id, info, test_pk) to COPY test_info
- psv-load-with-no-tx-control.sql: Add (id, info, test_pk) to COPY test_info
- tab-load-with-delimiter-no-tx-control.sql: Add (id, info, test_pk) to COPY test_info
- tab-load-with-no-tx-control.sql: Add (id, info, test_pk) to COPY test_info

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Update COPY commands in regression test files to explicitly specify
column names to fix compatibility with GMS PR #3055 that correctly
rejects empty INSERT VALUES when no defaults exist.

Files updated:
- aggregates.sql: Add column names to COPY aggtest, bitwise_test, bool_test
- interval.sql: Add (span) to COPY INTERVAL_MULDIV_TBL
- psql.sql: Add (s) to COPY psql_comics
- rowsecurity.sql: Add (a, b) to COPY copy_t statements

This should resolve the 60.93% regression test failure rate caused by
COPY commands failing to load test data.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@elianddb elianddb force-pushed the elianddb/3055-doltgres-test-fix branch from b4bc025 to 72fc2ed Compare July 10, 2025 21:52
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@elianddb elianddb closed this Aug 8, 2025
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.

1 participant