From 5acf436de9d40283876f2a8f6f7db340887cde57 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Fri, 29 Dec 2023 16:13:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20presto=E6=95=B0=E6=8D=AE=E9=9B=86=20bool?= =?UTF-8?q?ean=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=AD=97=E6=AE=B5=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=EF=BC=8C=E4=B8=8D=E8=83=BD=E7=94=A80=EF=BC=8C1?= =?UTF-8?q?=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datasource/dm/query/PrestoQueryProvider.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/extensions/dataease-extensions-datasource/presto/presto-backend/src/main/java/io/dataease/plugins/datasource/dm/query/PrestoQueryProvider.java b/extensions/dataease-extensions-datasource/presto/presto-backend/src/main/java/io/dataease/plugins/datasource/dm/query/PrestoQueryProvider.java index 698735d5d7..2c3cf4e0cd 100644 --- a/extensions/dataease-extensions-datasource/presto/presto-backend/src/main/java/io/dataease/plugins/datasource/dm/query/PrestoQueryProvider.java +++ b/extensions/dataease-extensions-datasource/presto/presto-backend/src/main/java/io/dataease/plugins/datasource/dm/query/PrestoQueryProvider.java @@ -985,9 +985,12 @@ public class PrestoQueryProvider extends QueryProvider { if (field.getDeExtractType() == 1) { whereName = String.format(PrestoConstants.UNIX_TIMESTAMP, originName); } - if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { + if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3) { whereName = originName; } + if (field.getDeExtractType() == 4) { + whereName = String.format(PrestoConstants.CAST, originName, "bigint"); + } } else { whereName = originName; } @@ -1185,9 +1188,12 @@ public class PrestoQueryProvider extends QueryProvider { if (field.getDeExtractType() == 1) { whereName = String.format(PrestoConstants.UNIX_TIMESTAMP, originName); } - if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { + if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3) { whereName = originName; } + if (field.getDeExtractType() == 4) { + whereName = String.format(PrestoConstants.CAST, originName, "bigint"); + } } else { whereName = originName; } @@ -1284,9 +1290,12 @@ public class PrestoQueryProvider extends QueryProvider { if (field.getDeExtractType() == 1) { whereName = String.format(PrestoConstants.UNIX_TIMESTAMP, originName); } - if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { + if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3) { whereName = originName; } + if (field.getDeExtractType() == 4) { + whereName = String.format(PrestoConstants.CAST, originName, "bigint"); + } } else { whereName = originName; }