Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ public void test()
{
// https://github.com/prestodb/presto/issues/10592
try (QueryAssertions assertions = new QueryAssertions()) {
assertThat(assertions.query(
"WITH " +
" t (a, b) AS (VALUES (1, 'a'), (1, 'b')), " +
" u (a) AS (VALUES 1) " +
"SELECT DISTINCT v.a " +
"FROM ( " +
" SELECT DISTINCT a, b " +
" FROM t) v " +
"LEFT JOIN u on v.a = u.a"))
assertThat(assertions.query("""
WITH
t (a, b) AS (VALUES (1, 'a'), (1, 'b')),
u (a) AS (VALUES 1)
SELECT DISTINCT v.a
FROM (
SELECT DISTINCT a, b
FROM t) v
LEFT JOIN u on v.a = u.a
"""))
.matches("VALUES 1");
}
}
Expand Down
Loading