Merge pull request #7478 from dataease/pr@dev@fixSql

Pr@dev@fix sql
This commit is contained in:
taojinlong 2023-12-29 16:14:42 +08:00 committed by GitHub
commit 28524d5e18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}