aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruzhas <uzhas@ydb.tech>2022-11-07 21:18:53 +0300
committeruzhas <uzhas@ydb.tech>2022-11-07 21:18:53 +0300
commitc2c68f821b20a5ebda2d7b52c0d6036241952311 (patch)
tree7845bcbdc9de061df4da287de1f2548764813ae3
parent6049c4f06222778f764111348c11ddbbacb50fa2 (diff)
downloadydb-c2c68f821b20a5ebda2d7b52c0d6036241952311.tar.gz
add syntax field to query to allow postgresql dialect
-rw-r--r--ydb/public/api/protos/fq.proto11
-rw-r--r--ydb/public/api/protos/yq.proto11
2 files changed, 22 insertions, 0 deletions
diff --git a/ydb/public/api/protos/fq.proto b/ydb/public/api/protos/fq.proto
index 357dd1ac041..0e9ea8a9fa7 100644
--- a/ydb/public/api/protos/fq.proto
+++ b/ydb/public/api/protos/fq.proto
@@ -107,6 +107,13 @@ message QueryContent {
ANALYTICS = 1; // Analytical query (used for analytical data processing for example to work with YDB, ClickHouse, ...)
STREAMING = 2; // Streaming query (used for streaming data processing, such as working with YDS)
}
+
+ enum QuerySyntax {
+ QUERY_SYNTAX_UNSPECIFIED = 0;
+ YQL_V1 = 1; // YQL version 1
+ PG = 2; // PostgresQL
+ }
+
QueryType type = 1;
string name = 2 [(Ydb.length).le = 1024];
Acl acl = 3;
@@ -118,6 +125,9 @@ message QueryContent {
// Well known settings are:
// "executor" - type of executor for this query
map<string, string> execution_settings = 10 [(Ydb.map_key).length.range = {min: 1, max: 100}, (Ydb.length).le = 4096];
+ // Syntax of the text
+ // By default it is "yql", but additional syntax "pg" (PostreSQL SQL frontend) is supported as well
+ QuerySyntax syntax = 11;
}
message CommonMeta {
@@ -361,6 +371,7 @@ message Job {
Acl acl = 10;
bool automatic = 11;
google.protobuf.Timestamp expire_at = 12;
+ QueryContent.QuerySyntax syntax = 13;
}
// Information about recent query runs
diff --git a/ydb/public/api/protos/yq.proto b/ydb/public/api/protos/yq.proto
index 3683722c120..70a9e2d7399 100644
--- a/ydb/public/api/protos/yq.proto
+++ b/ydb/public/api/protos/yq.proto
@@ -110,6 +110,13 @@ message QueryContent {
ANALYTICS = 1; // Analytical query (used for analytical data processing for example to work with YDB, ClickHouse, ...)
STREAMING = 2; // Streaming query (used for streaming data processing, such as working with YDS)
}
+
+ enum QuerySyntax {
+ QUERY_SYNTAX_UNSPECIFIED = 0;
+ YQL_V1 = 1; // YQL version 1
+ PG = 2; // PostgresQL
+ }
+
QueryType type = 1;
string name = 2 [(Ydb.length).le = 1024];
Acl acl = 3;
@@ -121,6 +128,9 @@ message QueryContent {
// Well known settings are:
// "executor" - type of executor for this query
map<string, string> execution_settings = 10 [(Ydb.map_key).length.range = {min: 1, max: 100}, (Ydb.length).le = 4096];
+ // Syntax of the text
+ // By default it is "yql", but additional syntax "pg" (PostreSQL SQL frontend) is supported as well
+ QuerySyntax syntax = 11;
}
message CommonMeta {
@@ -364,6 +374,7 @@ message Job {
Acl acl = 10;
bool automatic = 11;
google.protobuf.Timestamp expire_at = 12;
+ QueryContent.QuerySyntax syntax = 13;
}
// Information about recent query runs