Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug in certain limit .. offset queries #1015

Merged
merged 37 commits into from
Dec 7, 2024
Merged

Conversation

zachmu
Copy link
Member

@zachmu zachmu commented Nov 26, 2024

No description provided.

@zachmu zachmu requested a review from Hydrocharged November 26, 2024 22:19
Copy link
Contributor

github-actions bot commented Nov 26, 2024

Main PR
covering_index_scan_postgres 452.24/s ${\color{red}DNF}$
index_join_postgres 159.42/s ${\color{red}DNF}$
index_join_scan_postgres 187.05/s ${\color{red}DNF}$
index_scan_postgres 15.00/s ${\color{red}DNF}$
oltp_point_select 2847.83/s ${\color{red}DNF}$
oltp_read_only 1919.90/s ${\color{red}DNF}$
select_random_points 119.06/s ${\color{red}DNF}$
select_random_ranges 92.37/s ${\color{red}DNF}$
table_scan_postgres 14.50/s ${\color{red}DNF}$
types_table_scan_postgres 6.85/s ${\color{red}DNF}$

Copy link
Contributor

github-actions bot commented Nov 26, 2024

Main PR
Total 42090 42090
Successful 14534 14575
Failures 27556 27515
Partial Successes1 4689 4966
Main PR
Successful 34.5308% 34.6282%
Failures 65.4692% 65.3718%

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

alter_table

QUERY: ALTER TABLE attmp RENAME TO attmp_new;
QUERY: SELECT * FROM attmp_new;
QUERY: SELECT * FROM attmp_new;
QUERY: DROP TABLE attmp_new;
QUERY: ALTER TABLE part_attmp RENAME TO part_at2tmp;
QUERY: ALTER TABLE attmp_array2 RENAME TO _attmp_array;
QUERY: DROP TABLE _attmp_array;
QUERY: ALTER TABLE attmp_array RENAME TO _attmp_array;
QUERY: DROP TABLE _attmp_array;
QUERY: ALTER TABLE new_system_table RENAME TO old_system_table;
QUERY: CREATE INDEX old_system_table__othercol ON old_system_table (othercol);
QUERY: INSERT INTO old_system_table(othercol) VALUES ('somedata'), ('otherdata');
QUERY: UPDATE old_system_table SET id = -id;
QUERY: DELETE FROM old_system_table WHERE othercol = 'somedata';
QUERY: TRUNCATE old_system_table;
QUERY: ALTER TABLE old_system_table DROP COLUMN othercol;
QUERY: DROP TABLE old_system_table;
QUERY: CREATE TABLE attmp(i integer);

create_view

QUERY: ALTER TABLE tx1 RENAME TO a1;
QUERY: ALTER TABLE tt1 RENAME TO a2;
QUERY: ALTER TABLE a1 RENAME TO tt1;
QUERY: ALTER TABLE a2 RENAME TO tx1;
QUERY: ALTER TABLE temp_view_test.tt1 RENAME TO tmp1;

join

QUERY: select * from
  ((select 2 as v) union all (select 3 as v)) as q1
  cross join lateral
  ((select * from
      ((select 4 as v) union all (select 5 as v)) as q3)
   union all
   (select q1.v)
  ) as q2;

random

QUERY: (SELECT unique1 AS random
  FROM onek ORDER BY random() LIMIT 1)
INTERSECT
(SELECT unique1 AS random
  FROM onek ORDER BY random() LIMIT 1)
INTERSECT
(SELECT unique1 AS random
  FROM onek ORDER BY random() LIMIT 1);

subselect

QUERY: SELECT * FROM ((SELECT 1 AS x)) ss;
QUERY: (SELECT 2) UNION SELECT 2;
QUERY: ((SELECT 2)) UNION SELECT 2;
QUERY: SELECT ((SELECT 2) UNION SELECT 2);
QUERY: SELECT (((SELECT 2)) UNION SELECT 2);
QUERY: with recursive x(a) as
  ((values ('a'), ('b'))
   union all
   (with z as not materialized (select * from x)
    select z.a || z.a as a from z
    where length(z.a || z.a) < 5))
select * from x;

union

QUERY: (SELECT 1,2,3 UNION SELECT 4,5,6) INTERSECT SELECT 4,5,6;
QUERY: (SELECT 1,2,3 UNION SELECT 4,5,6 ORDER BY 1,2) INTERSECT SELECT 4,5,6;
QUERY: (SELECT 1,2,3 UNION SELECT 4,5,6) EXCEPT SELECT 4,5,6;
QUERY: (SELECT 1,2,3 UNION SELECT 4,5,6 ORDER BY 1,2) EXCEPT SELECT 4,5,6;
QUERY: SELECT q1 FROM int8_tbl INTERSECT (((SELECT q2 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl))) ORDER BY 1;
QUERY: (((SELECT q1 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl))) EXCEPT SELECT q1 FROM int8_tbl ORDER BY 1;
QUERY: SELECT q1 FROM int8_tbl EXCEPT (((SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1))) ORDER BY 1;
QUERY: (((((select * from int8_tbl)))));

with

QUERY: WITH RECURSIVE outermost(x) AS (
 SELECT 1
 UNION (WITH innermost1 AS (
  SELECT 2
  UNION (WITH innermost2 AS (
   SELECT 3
   UNION (WITH innermost3 AS (
    SELECT 4
    UNION (WITH innermost4 AS (
     SELECT 5
     UNION (WITH innermost5 AS (
      SELECT 6
      UNION (WITH innermost6 AS
       (SELECT 7)
       SELECT * FROM innermost6))
      SELECT * FROM innermost5))
     SELECT * FROM innermost4))
    SELECT * FROM innermost3))
   SELECT * FROM innermost2))
  SELECT * FROM outermost
  UNION SELECT * FROM innermost1)
 )
 SELECT * FROM outermost ORDER BY 1;

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.

Copy link
Collaborator

@Hydrocharged Hydrocharged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, just would rather make that WithChildren change

server/analyzer/init.go Show resolved Hide resolved
testing/go/limit_test.go Show resolved Hide resolved
testing/go/enginetest/doltgres_engine_test.go Outdated Show resolved Hide resolved
@zachmu zachmu merged commit b5fab7e into main Dec 7, 2024
1 of 14 checks passed
@zachmu zachmu deleted the zachmu/enginetests7 branch December 7, 2024 01:24
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