steampipe-postgres-fdw icon indicating copy to clipboard operation
steampipe-postgres-fdw copied to clipboard

Query not working with multiple in clause

Open bigdatasourav opened this issue 3 years ago • 1 comments

Query tested in https://github.com/turbot/steampipe-plugin-aws/pull/1134

Case 1 : with Single in clause (query is working)

> explain select service_code, version from aws_pricing_product where service_code = 'AmazonEC2' and field = 'instanceType' and value in ('r5d.16xlarge','t3.micro') limit 1
+-----------------------------------------------------------------------------------------------------------------------------------------------+
| QUERY PLAN                                                                                                                                    |
+-----------------------------------------------------------------------------------------------------------------------------------------------+
| Limit  (cost=0.00..40000000.00 rows=1 width=400)                                                                                              |
|   ->  Foreign Scan on aws_pricing_product  (cost=0.00..40000000000000.00 rows=1000000 width=400)                                              |
|         Filter: ((value = ANY ('{r5d.16xlarge,t3.micro}'::text[])) AND (service_code = 'AmazonEC2'::text) AND (field = 'instanceType'::text)) |
+-----------------------------------------------------------------------------------------------------------------------------------------------+

Case 2 : with multiple in clause (query is not working)

> explain select * from aws_pricing_product where service_code in ('AmazonEC2','test') and field = 'instanceType' and value in ('r5d.16xlarge','t3.micro') limit 1
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| QUERY PLAN                                                                                                                                                   |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Limit  (cost=0.00..100000000.00 rows=1 width=1000)                                                                                                           |
|   ->  Foreign Scan on aws_pricing_product  (cost=0.00..100000000000000.00 rows=1000000 width=1000)                                                           |
|         Filter: ((service_code = ANY ('{AmazonEC2,test}'::text[])) AND (value = ANY ('{r5d.16xlarge,t3.micro}'::text[])) AND (field = 'instanceType'::text)) |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+

bigdatasourav avatar Jul 04 '22 13:07 bigdatasourav

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar May 01 '25 08:05 github-actions[bot]

This issue was closed because it has been stalled for 90 days with no activity.

github-actions[bot] avatar Jun 01 '25 08:06 github-actions[bot]