Skip to content

Commit a036345

Browse files
committed
merge: propagate the tsql linter test fix from feat/query-safety-tri-11165
2 parents 112b837 + cf7fa9a commit a036345

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

apps/webapp/app/components/code/tsql/tsqlLinter.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ describe("tsqlLinter", () => {
6868
expect(error).toContain("line");
6969
});
7070

71-
it("should handle missing FROM clause", () => {
72-
const error = getTSQLError("SELECT * WHERE id = 1");
73-
expect(error).not.toBeNull();
71+
it("should accept a query without a FROM clause", () => {
72+
// FROM is optional in the grammar (ClickHouse allows e.g. `SELECT 1`),
73+
// so a FROM-less SELECT is syntactically valid.
74+
expect(getTSQLError("SELECT * WHERE id = 1")).toBeNull();
7475
});
7576
});
7677
});

0 commit comments

Comments
 (0)