ChenHuajun / pg_roaringbitmap

RoaringBitmap extension for PostgreSQL
Apache License 2.0
218 stars 37 forks source link

Test failing on PostgreSQL 13 due to query plan #16

Closed joelonsql closed 3 years ago

joelonsql commented 3 years ago

Thanks for making pg_roaringbitmap.

I noticed the test fails on PostgreSQL 13.

I don't see how it can be fixed though without breaking the test for earlier PostgreSQL versions, since the QUERY PLAN output will be different across versions.

$ cat regression.diffs
diff -U3 /home/joel/postgresql-extensions/pg_roaringbitmap/expected/roaringbitmap.out /home/joel/postgresql-extensions/pg_roaringbitmap/results/roaringbitmap.out
--- /home/joel/postgresql-extensions/pg_roaringbitmap/expected/roaringbitmap.out    2021-04-26 04:52:48.884525323 +0000
+++ /home/joel/postgresql-extensions/pg_roaringbitmap/results/roaringbitmap.out 2021-04-26 04:53:49.277300216 +0000
@@ -2644,10 +2644,10 @@
 --------------------------------------------------------------
  Limit
    ->  WindowAgg
-         ->  Sort
-               Sort Key: id
-               ->  Gather
-                     Workers Planned: 2
+         ->  Gather Merge
+               Workers Planned: 2
+               ->  Sort
+                     Sort Key: id
                      ->  Parallel Seq Scan on bitmap_test_tb1
 (7 rows)
ChenHuajun commented 3 years ago

Thanks for report. It seems that the execution plan cannot be directly output, and some judgments need to be made first. I will fix it soon.

Joezczhang commented 2 years ago

After test with PG10、11、12、13. I think there are some difference because of PG version, for PG10、11、12, the result should be Limit -> WindowAgg -> Sort Sort Key: id -> Gather Workers Planned: 2

but for PG13, the result should be -> Gather Merge Workers Planned: 2 -> Sort Sort Key: id -> Parallel Seq Scan on bitmap_test_tb1 Please confirm what I did.

ChenHuajun commented 2 years ago

This is just beacuse of test cases, you can use the latest test cases from the master branch or v0.5.3.