You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to run a query on the aws_route53_record table, using zone_id and type in the where clause with IN operators.
case 1: Using zone_id with IN operator and type with OR operator (Working fine)
> select
name, type
from
aws_route53_record as a
where
a.zone_id = 'Z0932967H1B9NJ7ZL7LX' or a.zone_id = 'Z02488371E7NPRCAR7QSQ'
and a.type in ('CNAME', 'A');
+----------------------+-------+
| name | type |
+----------------------+-------+
| dsads.test343.com. | A |
| test.test343.com. | A |
| testee.test343.com. | CNAME |
| test.23.com. | SOA |
| test3.test.23.com. | CNAME |
| test1.test.23.com. | CNAME |
| txt.test.23.com. | TXT |
| tewst44.test.23.com. | A |
| test.23.com. | NS |
+----------------------+-------+
Time: 3.6s. Rows fetched: 12. Hydrate calls: 0.
Case 2: Using zone_id with OR operator and type with IN operator (Working fine)
> select
name, type
from
aws_route53_record as a
where
a.zone_id in ('Z0932967H1B9NJ7ZL7LX', 'Z02488371E7NPRCAR7QSQ')
and a.type = 'CNAME' or a.type = 'A'
+----------------------+-------+
| name | type |
+----------------------+-------+
| test1.test.23.com. | CNAME |
| test3.test.23.com. | CNAME |
| tewst44.test.23.com. | A |
| testee.test343.com. | CNAME |
| dsads.test343.com. | A |
| test.test343.com. | A |
+----------------------+-------+
Time: 3.5s. Rows fetched: 12. Hydrate calls: 0.
Case 3: Using IN operator for both of the columns (Throws error)
> select
name, type
from
aws_route53_record as a
where
a.zone_id in ('Z0932967H1B9NJ7ZL7LX', 'Z02488371E7NPRCAR7QSQ')
and a.type in ('CNAME', 'A');
Error: interface conversion: interface {} is []interface {}, not string (SQLSTATE HV000)
+------+------+
| name | type |
+------+------+
+------+------+
Time: 1.7s.
Reproduction Steps
Create multiple AWS Hosted Zones with different types of records as follows.
> select zone_id, name, type from aws_route53_record order by zone_id
+-----------------------+------------------------+-------+
| zone_id | name | type |
+-----------------------+------------------------+-------+
| xxxxxxxxxxxxxxxxxxxxx | test.test343.com. | A |
| xxxxxxxxxxxxxxxxxxxxx | dsads.test343.com. | A |
| xxxxxxxxxxxxxxxxxxxxx | test343.com. | NS |
| xxxxxxxxxxxxxxxxxxxxx | testee.test343.com. | CNAME |
| xxxxxxxxxxxxxxxxxxxxx | eqwjwewql.test343.com. | MX |
| xxxxxxxxxxxxxxxxxxxxx | test343.com. | SOA |
| yyyyyyyyyyyyyyyyyyyy | test1.test.23.com. | CNAME |
| yyyyyyyyyyyyyyyyyyyy | txt.test.23.com. | TXT |
| yyyyyyyyyyyyyyyyyyyy | test.23.com. | NS |
| yyyyyyyyyyyyyyyyyyyy | test3.test.23.com. | CNAME |
| yyyyyyyyyyyyyyyyyyyy | tewst44.test.23.com. | A |
| yyyyyyyyyyyyyyyyyyyy | test.23.com. | SOA |
+-----------------------+------------------------+-------+
Then, try to execute the query as mentioned in the Observations section.
Expected: For all cases, the query should have a smooth execution with expected result.
Thanks!
The text was updated successfully, but these errors were encountered:
Observations
I tried to run a query on the
aws_route53_record
table, usingzone_id
andtype
in the where clause withIN
operators.case 1: Using
zone_id
withIN
operator andtype
withOR
operator (Working fine)Case 2: Using
zone_id
withOR
operator andtype
withIN
operator (Working fine)Case 3: Using
IN
operator for both of the columns (Throws error)Reproduction Steps
Create multiple AWS Hosted Zones with different types of records as follows.
Then, try to execute the query as mentioned in the Observations section.
Expected: For all cases, the query should have a smooth execution with expected result.
Thanks!
The text was updated successfully, but these errors were encountered: