diff options
author | uzhas <uzhas@ydb.tech> | 2022-09-24 11:09:42 +0300 |
---|---|---|
committer | uzhas <uzhas@ydb.tech> | 2022-09-24 11:09:42 +0300 |
commit | 702b9567dcbc49e9e7897954449ff72cf8579f01 (patch) | |
tree | d91cd6d451cb262eb7d17d0c188398846594a69e | |
parent | 4818e074565dd5fb62062beebb38a7fbe28e8996 (diff) | |
download | ydb-702b9567dcbc49e9e7897954449ff72cf8579f01.tar.gz |
fq public HTTP API lib, rename data->rows, submitted_at->started_at
-rw-r--r-- | ydb/core/public_http/fq_handlers.h | 5 | ||||
-rw-r--r-- | ydb/core/public_http/protos/fq.proto | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/ydb/core/public_http/fq_handlers.h b/ydb/core/public_http/fq_handlers.h index 9670b33106..868ad5e1a0 100644 --- a/ydb/core/public_http/fq_handlers.h +++ b/ydb/core/public_http/fq_handlers.h @@ -95,7 +95,7 @@ void FqConvert(const YandexQuery::CommonMeta& src, FQHttp::QueryMeta& dst) { } void FqConvert(const YandexQuery::QueryMeta& src, FQHttp::QueryMeta& dst) { - SIMPLE_COPY_MUTABLE_FIELD(submitted_at); + SIMPLE_COPY_MUTABLE_RENAME_FIELD(submitted_at, started_at); SIMPLE_COPY_MUTABLE_FIELD(finished_at); FqConvert(src.common(), dst); } @@ -182,6 +182,9 @@ void FqPackToJson(TStringStream& json, const FQHttp::GetResultDataResult& httpRe auto resultSet = NYdb::TResultSet(httpResult.result_set()); NJson::TJsonValue v; NYq::FormatResultSet(v, resultSet, true, true); + // rename key data -> rows + v["rows"] = v["data"]; + v.EraseValue("data"); NJson::TJsonWriterConfig jsonWriterConfig; jsonWriterConfig.WriteNanAsString = true; NJson::WriteJson(&json, &v, jsonWriterConfig); diff --git a/ydb/core/public_http/protos/fq.proto b/ydb/core/public_http/protos/fq.proto index 4214418420..7a387cfbb8 100644 --- a/ydb/core/public_http/protos/fq.proto +++ b/ydb/core/public_http/protos/fq.proto @@ -19,7 +19,7 @@ message Error { message QueryMeta { google.protobuf.Timestamp created_at = 1; - google.protobuf.Timestamp submitted_at = 2; + google.protobuf.Timestamp started_at = 2; google.protobuf.Timestamp finished_at = 3; } @@ -96,10 +96,6 @@ message GetResultDataRequest { int64 limit = 4 [(Ydb.value) = "[1; 1000]"]; } -message RowData { - repeated string data = 1; -} - message GetResultDataResult { Ydb.ResultSet result_set = 1; } |