Skip to content

Commit 74faa18

Browse files
committed
[WIP] test: Add duplicated members in wrapper smoke test
1 parent 9956ad7 commit 74faa18

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

packages/cubejs-testing/test/smoke-cubesql.test.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,5 +660,40 @@ filter_subq AS (
660660
const res = await connection.query(query);
661661
expect(res.rows).toMatchSnapshot('query-view-deep-joins');
662662
});
663+
664+
test('wrapper with duplicated members', async () => {
665+
const query = `
666+
SELECT
667+
"foo",
668+
"bar",
669+
CASE
670+
WHEN "bar" = 'new'
671+
THEN 1
672+
ELSE 0
673+
END
674+
AS "bar_expr"
675+
FROM (
676+
SELECT
677+
"rows"."foo" AS "foo",
678+
"rows"."bar" AS "bar"
679+
FROM (
680+
SELECT
681+
"status" AS "foo",
682+
"status" AS "bar"
683+
FROM MultiTypeCube
684+
) "rows"
685+
GROUP BY
686+
"foo",
687+
"bar"
688+
) "_"
689+
ORDER BY
690+
"bar_expr"
691+
LIMIT 1
692+
;
693+
`;
694+
695+
const res = await connection.query(query);
696+
expect(res.rows).toMatchSnapshot('wrapper-duplicated-members');
697+
});
663698
});
664699
});

0 commit comments

Comments
 (0)