avamingli commented on issue #1286:
URL: https://github.com/apache/cloudberry/issues/1286#issuecomment-3149304702
Interesting. I test this on Postgres, it returned 5 rows too if disable
using indexes including bitmap.
```sql
explain SELECT * FROM point_tbl WHERE f1 <@ polygon
'(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)';
QUERY PLAN
----------------------------------------------------------------------------------
Index Only Scan using gpointind on point_tbl (cost=0.13..8.15 rows=1
width=16)
Index Cond: (f1 <@
'((0,0),(0,100),(100,100),(50,50),(100,0),(0,0))'::polygon)
(2 rows)
SELECT * FROM point_tbl WHERE f1 <@ polygon
'(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)';
f1
------------------
(1e-300,-1e-300)
(0,0)
(10,10)
(5.1,34.5)
(4 rows)
set enable_indexonlyscan = off;
set enable_indexscan = off;
set enable_bitmapscan = off;
explain(costs off, verbose) SELECT * FROM point_tbl WHERE f1 <@ polygon
'(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)';
QUERY PLAN
----------------------------------------------------------------------------------------
Seq Scan on tpcds.point_tbl
Disabled: true
Output: f1
Filter: (point_tbl.f1 <@
'((0,0),(0,100),(100,100),(50,50),(100,0),(0,0))'::polygon)
(4 rows)
SELECT * FROM point_tbl WHERE f1 <@ polygon
'(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)';
f1
------------------
(0,0)
(5.1,34.5)
(1e-300,-1e-300)
(NaN,NaN)
(10,10)
(5 rows
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]