Skip to content

Commit

Permalink
fix "'set operations (union all) from query builder'" test
Browse files Browse the repository at this point in the history
  • Loading branch information
apeng-singlestore committed Aug 30, 2024
1 parent 5bbeab1 commit 98bb6fe
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions integration-tests/tests/singlestore/singlestore-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2624,18 +2624,20 @@ export function tests(driver?: string) {
})()).rejects.toThrowError();
});

test('set operations (union all) from query builder', async (ctx) => {
test.only('set operations (union all) from query builder', async (ctx) => {
const { db } = ctx.singlestore;

await setupSetOperationTest(db);

const result = await db
const sq = db
.select({ id: citiesTable.id, name: citiesTable.name })
.from(citiesTable).limit(2).unionAll(
.from(citiesTable).orderBy(asc(sql`id`)).limit(2).unionAll(
db
.select({ id: citiesTable.id, name: citiesTable.name })
.from(citiesTable).limit(2),
).orderBy(asc(sql`id`)).limit(3);
.from(citiesTable).orderBy(asc(sql`id`)).limit(2),
).as('sq');

const result = await db.select().from(sq).orderBy(asc(sql`id`)).limit(3);

expect(result).toHaveLength(3);

Expand Down

0 comments on commit 98bb6fe

Please sign in to comment.