Yugabyte - use distinct on clause with Yugabyte (like Postgres)

This commit is contained in:
Rob Bygrave committed 2022-02-02 23:38:50 +13:00
1 parent 2cd769d00f
commit 94951a5476
12 files changed
+28 -24

No files matched your search

@@ -121,7 +121,7 @@ public class IsEmptyExpressionQueryTest extends BaseTestCase {
.query();
query.findList();
if (isPostgres()) {
if (platformDistinctOn()) {
assertThat(sqlOf(query)).contains("select distinct on (t0.id) t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where not exists (select 1 from contact_note x where x.contact_id = u1.id)");
} else {
@@ -140,7 +140,7 @@ public class IsEmptyExpressionQueryTest extends BaseTestCase {
.query();
query.findList();
if (isPostgres()) {
if (platformDistinctOn()) {
assertThat(sqlOf(query)).contains("select distinct on (t0.id) t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where exists (select 1 from contact_note x where x.contact_id = u1.id)");
} else {