dt %&gt;% filter(Product %in% "A" &amp; Country %in% "AI" &amp; Year %in% 1990 )\n##test2\ndbdt %&gt;% filter(Product == "A" &amp; Country == "AI" &amp; Year == 1990 )\n##test3\ndbdt %&gt;% filter(Product %in% c("A", "B") &amp; Country %in% c("AI", "AJ") &amp; Year %in% c(1990, 1991) )\n\n\n```\n\nThe `test1` produces error, while the `test2` and `test3` pass without the problem. In R `test1` and `test2` should produce identical results. The same error is given with PostgreSQL and MySQL databases. Here is m