From e99b217fdac1be7aa5803ef509ca4de92efd27f8 Mon Sep 17 00:00:00 2001 From: Hellen Date: Mon, 20 Jan 2025 18:16:10 +0300 Subject: [PATCH] chore(autocomplete): add supported types (#1826) --- src/types/index.ts | 7 +++++++ src/utils/monaco/yql/constants.ts | 7 +++++++ src/utils/query.ts | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/src/types/index.ts b/src/types/index.ts index 8e3666fa3..2a3eb7314 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -29,4 +29,11 @@ export enum YQLType { TzDate = 'TzDate', TzDateTime = 'TzDateTime', TzTimestamp = 'TzTimestamp', + Date32 = 'Date32', + Datetime64 = 'Datetime64', + Timestamp64 = 'Timestamp64', + Interval64 = 'Interval64', + TzDate32 = 'TzDate32', + TzDatetime64 = 'TzDatetime64', + TzTimestamp64 = 'TzTimestamp64', } diff --git a/src/utils/monaco/yql/constants.ts b/src/utils/monaco/yql/constants.ts index 2d207aca5..5af55ad67 100644 --- a/src/utils/monaco/yql/constants.ts +++ b/src/utils/monaco/yql/constants.ts @@ -20,6 +20,13 @@ export const SimpleTypes = [ 'Datetime', 'Timestamp', 'Interval', + 'Date32', + 'Datetime64', + 'Timestamp64', + 'Interval64', + 'TzDate32', + 'TzDatetime64', + 'TzTimestamp64', 'Null', 'Int8', 'Uint8', diff --git a/src/utils/query.ts b/src/utils/query.ts index 1b8d8cdd6..4dc87615c 100644 --- a/src/utils/query.ts +++ b/src/utils/query.ts @@ -126,6 +126,13 @@ export const getColumnType = (type: string) => { case YQLType.TzDate: case YQLType.TzDateTime: case YQLType.TzTimestamp: + case YQLType.Date32: + case YQLType.Datetime64: + case YQLType.Timestamp64: + case YQLType.Interval64: + case YQLType.TzDate32: + case YQLType.TzDatetime64: + case YQLType.TzTimestamp64: return 'date'; default: return undefined;