diff --git a/src/languages/trino/trino.formatter.ts b/src/languages/trino/trino.formatter.ts index bcb9d54dc1..9fe0488d60 100644 --- a/src/languages/trino/trino.formatter.ts +++ b/src/languages/trino/trino.formatter.ts @@ -155,6 +155,8 @@ export const trino: DialectOptions = { // https://trino.io/docs/current/language/reserved.html identTypes: ['""-qq'], paramTypes: { positional: true }, + // https://trino.io/docs/current/language/types.html#integer + underscoresInNumbers: true, operators: [ '%', '->', diff --git a/test/trino.test.ts b/test/trino.test.ts index f546ebe485..f397f883d1 100644 --- a/test/trino.test.ts +++ b/test/trino.test.ts @@ -33,7 +33,7 @@ describe('TrinoFormatter', () => { const format: FormatFn = (query, cfg = {}) => originalFormat(query, { ...cfg, language }); behavesLikeSqlFormatter(format); - supportsNumbers(format); + supportsNumbers(format, { underscore: true }); supportsComments(format); supportsCommentOn(format); supportsCreateView(format, { orReplace: true, materialized: true });