Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update comments and set default order by as average_query_time for ListSlowQueries (#5647)

rebelice435e055c3b04
diff --git a/backend/api/v1/database_service.go b/backend/api/v1/database_service.go
index f5cb4cebfd..fdc14e9942 100644
--- a/backend/api/v1/database_service.go
+++ b/backend/api/v1/database_service.go
@@ -31,8 +31,8 @@ const (
filterKeyProject = "project"
filterKeyStartTime = "start_time"
- // Support order by count, latest_log_time, average_query_time, nighty_fifth_percentile_query_time,
- // average_rows_sent, nighty_fifth_percentile_rows_sent, average_rows_examined, nighty_fifth_percentile_rows_examined for now.
+ // Support order by count, latest_log_time, average_query_time, maximum_query_time,
+ // average_rows_sent, maximum_rows_sent, average_rows_examined, maximum_rows_examined for now.
orderByKeyCount = "count"
orderByKeyLatestLogTime = "latest_log_time"
orderByKeyAverageQueryTime = "average_query_time"
@@ -637,7 +637,7 @@ func sortSlowQueryLogResponse(response *v1pb.ListSlowQueriesResponse, orderByKey
if len(orderByKeys) == 0 {
orderByKeys = []orderByKey{
{
- key: orderByKeyMaximumQueryTime,
+ key: orderByKeyAverageQueryTime,
isAscend: false,
},
}
@@ -733,8 +733,8 @@ func sortSlowQueryLogResponse(response *v1pb.ListSlowQueriesResponse, orderByKey
func validSlowQueryOrderByKey(keys []orderByKey) error {
for _, key := range keys {
switch key.key {
- // Support order by count, latest_log_time, average_query_time, nighty_fifth_percentile_query_time,
- // average_rows_sent, nighty_fifth_percentile_rows_sent, average_rows_examined, nighty_fifth_percentile_rows_examined for now.
+ // Support order by count, latest_log_time, average_query_time, maximum_query_time,
+ // average_rows_sent, maximum_rows_sent, average_rows_examined, maximum_rows_examined for now.
case orderByKeyCount, orderByKeyLatestLogTime, orderByKeyAverageQueryTime, orderByKeyMaximumQueryTime,
orderByKeyAverageRowsSent, orderByKeyMaximumRowsSent, orderByKeyAverageRowsExamined, orderByKeyMaximumRowsExamined:
default:
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.ts
index 732b3e57d6..71146cb3cc 100644
--- a/frontend/src/types/proto/google/protobuf/descriptor.ts
+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts
@@ -42,9 +42,13 @@ export interface FileDescriptorProto {
sourceCodeInfo?: SourceCodeInfo;
/**
* The syntax of the proto file.
- * The supported values are "proto2" and "proto3".
+ * The supported values are "proto2", "proto3", and "editions".
+ *
+ * If `edition` is present, this value must be "editions".
*/
syntax: string;
+ /** The edition of the proto file, which is an opaque string. */
+ edition: string;
}
/** Describes a message type. */
@@ -619,6 +623,10 @@ export interface MessageOptions {
*/
deprecated: boolean;
/**
+ * NOTE: Do not set the option in .proto files. Always use the maps syntax
+ * instead. The option should only be implicitly set by the proto compiler
+ * parser.
+ *
* Whether the message is an automatically generated map entry type for the
* maps field.
*
@@ -636,12 +644,23 @@ export interface MessageOptions {
* use a native map in the target language to hold the keys and values.
* The reflection APIs in such implementations still need to work as
* if the field is a repeated message field.
- *
- * NOTE: Do not set the option in .proto files. Always use the maps syntax
- * instead. The option should only be implicitly set by the proto compiler
- * parser.
*/
mapEntry: boolean;
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ *
+ * This should only be used as a temporary measure against broken builds due
+ * to the change in behavior for JSON field name conflicts.
+ *
+ * TODO(b/261750190) This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ *
+ * @deprecated
+ */
+ deprecatedLegacyJsonFieldConflicts: boolean;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -705,11 +724,8 @@ export interface FieldOptions {
* check its required fields, regardless of whether or not the message has
* been parsed.
*
- * As of 2021, lazy does no correctness checks on the byte stream during
- * parsing. This may lead to crashes if and when an invalid byte stream is
- * finally parsed upon access.
- *
- * TODO(b/211906113): Enable validation on lazy fields.
+ * As of May 2022, lazy verifies the contents of the byte stream during
+ * parsing. An invalid byte stream will cause the overall parsing to fail.
*/
lazy: boolean;
/**
@@ -727,6 +743,13 @@ export interface FieldOptions {
deprecated: boolean;
/** For Google-internal migration only. Do not use. */
weak: boolean;
+ /**
+ * Indicate that the field value should not be printed out when using debug
+ * formats, e.g. when the field contains sensitive credentials.
+ */
+ debugRedact: boolean;
+ retention: FieldOptions_OptionRetention;
+ target: FieldOptions_OptionTargetType;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -813,6 +836,137 @@ export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string {
}
}
+/**
+ * If set to RETENTION_SOURCE, the option will be omitted from the binary.
+ * Note: as of January 2023, support for this is in progress and does not yet
+ * have an effect (b/264593489).
+ */
+export enum FieldOptions_OptionRetention {
+ RETENTION_UNKNOWN = 0,
+ RETENTION_RUNTIME = 1,
+ RETENTION_SOURCE = 2,
+ UNRECOGNIZED = -1,
+}
+
+export function fieldOptions_OptionRetentionFromJSON(object: any): FieldOptions_OptionRetention {
+ switch (object) {
+ case 0:
+ case "RETENTION_UNKNOWN":
+ return FieldOptions_OptionRetention.RETENTION_UNKNOWN;
+ case 1:
+ case "RETENTION_RUNTIME":
+ return FieldOptions_OptionRetention.RETENTION_RUNTIME;
+ case 2:
+ case "RETENTION_SOURCE":
+ return FieldOptions_OptionRetention.RETENTION_SOURCE;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return FieldOptions_OptionRetention.UNRECOGNIZED;
+ }
+}
+
+export function fieldOptions_OptionRetentionToJSON(object: FieldOptions_OptionRetention): string {
+ switch (object) {
+ case FieldOptions_OptionRetention.RETENTION_UNKNOWN:
+ return "RETENTION_UNKNOWN";
+ case FieldOptions_OptionRetention.RETENTION_RUNTIME:
+ return "RETENTION_RUNTIME";
+ case FieldOptions_OptionRetention.RETENTION_SOURCE:
+ return "RETENTION_SOURCE";
+ case FieldOptions_OptionRetention.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
+
+/**
+ * This indicates the types of entities that the field may apply to when used
+ * as an option. If it is unset, then the field may be freely used as an
+ * option on any kind of entity. Note: as of January 2023, support for this is
+ * in progress and does not yet have an effect (b/264593489).
+ */
+export enum FieldOptions_OptionTargetType {
+ TARGET_TYPE_UNKNOWN = 0,
+ TARGET_TYPE_FILE = 1,
+ TARGET_TYPE_EXTENSION_RANGE = 2,
+ TARGET_TYPE_MESSAGE = 3,
+ TARGET_TYPE_FIELD = 4,
+ TARGET_TYPE_ONEOF = 5,
+ TARGET_TYPE_ENUM = 6,
+ TARGET_TYPE_ENUM_ENTRY = 7,
+ TARGET_TYPE_SERVICE = 8,
+ TARGET_TYPE_METHOD = 9,
+ UNRECOGNIZED = -1,
+}
+
+export function fieldOptions_OptionTargetTypeFromJSON(object: any): FieldOptions_OptionTargetType {
+ switch (object) {
+ case 0:
+ case "TARGET_TYPE_UNKNOWN":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN;
+ case 1:
+ case "TARGET_TYPE_FILE":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_FILE;
+ case 2:
+ case "TARGET_TYPE_EXTENSION_RANGE":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE;
+ case 3:
+ case "TARGET_TYPE_MESSAGE":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE;
+ case 4:
+ case "TARGET_TYPE_FIELD":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_FIELD;
+ case 5:
+ case "TARGET_TYPE_ONEOF":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF;
+ case 6:
+ case "TARGET_TYPE_ENUM":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM;
+ case 7:
+ case "TARGET_TYPE_ENUM_ENTRY":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY;
+ case 8:
+ case "TARGET_TYPE_SERVICE":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE;
+ case 9:
+ case "TARGET_TYPE_METHOD":
+ return FieldOptions_OptionTargetType.TARGET_TYPE_METHOD;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return FieldOptions_OptionTargetType.UNRECOGNIZED;
+ }
+}
+
+export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionTargetType): string {
+ switch (object) {
+ case FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN:
+ return "TARGET_TYPE_UNKNOWN";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_FILE:
+ return "TARGET_TYPE_FILE";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE:
+ return "TARGET_TYPE_EXTENSION_RANGE";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE:
+ return "TARGET_TYPE_MESSAGE";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_FIELD:
+ return "TARGET_TYPE_FIELD";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF:
+ return "TARGET_TYPE_ONEOF";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM:
+ return "TARGET_TYPE_ENUM";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY:
+ return "TARGET_TYPE_ENUM_ENTRY";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE:
+ return "TARGET_TYPE_SERVICE";
+ case FieldOptions_OptionTargetType.TARGET_TYPE_METHOD:
+ return "TARGET_TYPE_METHOD";
+ case FieldOptions_OptionTargetType.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
+
export interface OneofOptions {
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
@@ -831,6 +985,17 @@ export interface EnumOptions {
* is a formalization for deprecating enums.
*/
deprecated: boolean;
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * TODO(b/261750190) Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ *
+ * @deprecated
+ */
+ deprecatedLegacyJsonFieldConflicts: boolean;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -1122,10 +1287,57 @@ export interface GeneratedCodeInfo_Annotation {
begin: number;
/**
* Identifies the ending offset in bytes in the generated code that
- * relates to the identified offset. The end offset should be one past
+ * relates to the identified object. The end offset should be one past
* the last relevant byte (so the length of the text = end - begin).
*/
end: number;
+ semantic: GeneratedCodeInfo_Annotation_Semantic;
+}
+
+/**
+ * Represents the identified object's effect on the element in the original
+ * .proto file.
+ */
+export enum GeneratedCodeInfo_Annotation_Semantic {
+ /** NONE - There is no effect or the effect is indescribable. */
+ NONE = 0,
+ /** SET - The element is set or otherwise mutated. */
+ SET = 1,
+ /** ALIAS - An alias to the element is returned. */
+ ALIAS = 2,
+ UNRECOGNIZED = -1,
+}
+
+export function generatedCodeInfo_Annotation_SemanticFromJSON(object: any): GeneratedCodeInfo_Annotation_Semantic {
+ switch (object) {
+ case 0:
+ case "NONE":
+ return GeneratedCodeInfo_Annotation_Semantic.NONE;
+ case 1:
+ case "SET":
+ return GeneratedCodeInfo_Annotation_Semantic.SET;
+ case 2:
+ case "ALIAS":
+ return GeneratedCodeInfo_Annotation_Semantic.ALIAS;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED;
+ }
+}
+
+export function generatedCodeInfo_Annotation_SemanticToJSON(object: GeneratedCodeInfo_Annotation_Semantic): string {
+ switch (object) {
+ case GeneratedCodeInfo_Annotation_Semantic.NONE:
+ return "NONE";
+ case GeneratedCodeInfo_Annotation_Semantic.SET:
+ return "SET";
+ case GeneratedCodeInfo_Annotation_Semantic.ALIAS:
+ return "ALIAS";
+ case GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
}
function createBaseFileDescriptorSet(): FileDescriptorSet {
@@ -1202,6 +1414,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {
options: undefined,
sourceCodeInfo: undefined,
syntax: "",
+ edition: "",
};
}
@@ -1247,6 +1460,9 @@ export const FileDescriptorProto = {
if (message.syntax !== "") {
writer.uint32(98).string(message.syntax);
}
+ if (message.edition !== "") {
+ writer.uint32(106).string(message.edition);
+ }
return writer;
},
@@ -1359,6 +1575,13 @@ export const FileDescriptorProto = {
message.syntax = reader.string();
continue;
+ case 13:
+ if (tag != 106) {
+ break;
+ }
+
+ message.edition = reader.string();
+ continue;
}
if ((tag & 7) == 4 || tag == 0) {
break;
@@ -1388,6 +1611,7 @@ export const FileDescriptorProto = {
options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,
sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,
syntax: isSet(object.syntax) ? String(object.syntax) : "",
+ edition: isSet(object.edition) ? String(object.edition) : "",
};
},
@@ -1434,6 +1658,7 @@ export const FileDescriptorProto = {
message.sourceCodeInfo !== undefined &&
(obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined);
message.syntax !== undefined && (obj.syntax = message.syntax);
+ message.edition !== undefined && (obj.edition = message.edition);
return obj;
},
@@ -1459,6 +1684,7 @@ export const FileDescriptorProto = {
? SourceCodeInfo.fromPartial(object.sourceCodeInfo)
: undefined;
message.syntax = object.syntax ?? "";
+ message.edition = object.edition ?? "";
return message;
},
};
@@ -3051,6 +3277,7 @@ function createBaseMessageOptions(): MessageOptions {
noStandardDescriptorAccessor: false,
deprecated: false,
mapEntry: false,
+ deprecatedLegacyJsonFieldConflicts: false,
uninterpretedOption: [],
};
}
@@ -3069,6 +3296,9 @@ export const MessageOptions = {
if (message.mapEntry === true) {
writer.uint32(56).bool(message.mapEntry);
}
+ if (message.deprecatedLegacyJsonFieldConflicts === true) {
+ writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts);
+ }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -3110,6 +3340,13 @@ export const MessageOptions = {
message.mapEntry = reader.bool();
continue;
+ case 11:
+ if (tag != 88) {
+ break;
+ }
+
+ message.deprecatedLegacyJsonFieldConflicts = reader.bool();
+ continue;
case 999:
if (tag != 7994) {
break;
@@ -3134,6 +3371,9 @@ export const MessageOptions = {
: false,
deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false,
+ deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
+ ? Boolean(object.deprecatedLegacyJsonFieldConflicts)
+ : false,
uninterpretedOption: Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -3147,6 +3387,8 @@ export const MessageOptions = {
(obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor);
message.deprecated !== undefined && (obj.deprecated = message.deprecated);
message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry);
+ message.deprecatedLegacyJsonFieldConflicts !== undefined &&
+ (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);
if (message.uninterpretedOption) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
} else {
@@ -3165,6 +3407,7 @@ export const MessageOptions = {
message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false;
message.deprecated = object.deprecated ?? false;
message.mapEntry = object.mapEntry ?? false;
+ message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -3179,6 +3422,9 @@ function createBaseFieldOptions(): FieldOptions {
unverifiedLazy: false,
deprecated: false,
weak: false,
+ debugRedact: false,
+ retention: 0,
+ target: 0,
uninterpretedOption: [],
};
}
@@ -3206,6 +3452,15 @@ export const FieldOptions = {
if (message.weak === true) {
writer.uint32(80).bool(message.weak);
}
+ if (message.debugRedact === true) {
+ writer.uint32(128).bool(message.debugRedact);
+ }
+ if (message.retention !== 0) {
+ writer.uint32(136).int32(message.retention);
+ }
+ if (message.target !== 0) {
+ writer.uint32(144).int32(message.target);
+ }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -3268,6 +3523,27 @@ export const FieldOptions = {
message.weak = reader.bool();
continue;
+ case 16:
+ if (tag != 128) {
+ break;
+ }
+
+ message.debugRedact = reader.bool();
+ continue;
+ case 17:
+ if (tag != 136) {
+ break;
+ }
+
+ message.retention = reader.int32() as any;
+ continue;
+ case 18:
+ if (tag != 144) {
+ break;
+ }
+
+ message.target = reader.int32() as any;
+ continue;
case 999:
if (tag != 7994) {
break;
@@ -3293,6 +3569,9 @@ export const FieldOptions = {
unverifiedLazy: isSet(object.unverifiedLazy) ? Boolean(object.unverifiedLazy) : false,
deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
weak: isSet(object.weak) ? Boolean(object.weak) : false,
+ debugRedact: isSet(object.debugRedact) ? Boolean(object.debugRedact) : false,
+ retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0,
+ target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0,
uninterpretedOption: Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -3308,6 +3587,9 @@ export const FieldOptions = {
message.unverifiedLazy !== undefined && (obj.unverifiedLazy = message.unverifiedLazy);
message.deprecated !== undefined && (obj.deprecated = message.deprecated);
message.weak !== undefined && (obj.weak = message.weak);
+ message.debugRedact !== undefined && (obj.debugRedact = message.debugRedact);
+ message.retention !== undefined && (obj.retention = fieldOptions_OptionRetentionToJSON(message.retention));
+ message.target !== undefined && (obj.target = fieldOptions_OptionTargetTypeToJSON(message.target));
if (message.uninterpretedOption) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
} else {
@@ -3329,6 +3611,9 @@ export const FieldOptions = {
message.unverifiedLazy = object.unverifiedLazy ?? false;
message.deprecated = object.deprecated ?? false;
message.weak = object.weak ?? false;
+ message.debugRedact = object.debugRedact ?? false;
+ message.retention = object.retention ?? 0;
+ message.target = object.target ?? 0;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -3399,7 +3684,7 @@ export const OneofOptions = {
};
function createBaseEnumOptions(): EnumOptions {
- return { allowAlias: false, deprecated: false, uninterpretedOption: [] };
+ return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };
}
export const EnumOptions = {
@@ -3410,6 +3695,9 @@ export const EnumOptions = {
if (message.deprecated === true) {
writer.uint32(24).bool(message.deprecated);
}
+ if (message.deprecatedLegacyJsonFieldConflicts === true) {
+ writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts);
+ }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -3437,6 +3725,13 @@ export const EnumOptions = {
message.deprecated = reader.bool();
continue;
+ case 6:
+ if (tag != 48) {
+ break;
+ }
+
+ message.deprecatedLegacyJsonFieldConflicts = reader.bool();
+ continue;
case 999:
if (tag != 7994) {
break;
@@ -3457,6 +3752,9 @@ export const EnumOptions = {
return {
allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false,
deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
+ deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
+ ? Boolean(object.deprecatedLegacyJsonFieldConflicts)
+ : false,
uninterpretedOption: Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -3467,6 +3765,8 @@ export const EnumOptions = {
const obj: any = {};
message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias);
message.deprecated !== undefined && (obj.deprecated = message.deprecated);
+ message.deprecatedLegacyJsonFieldConflicts !== undefined &&
+ (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);
if (message.uninterpretedOption) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
} else {
@@ -3483,6 +3783,7 @@ export const EnumOptions = {
const message = createBaseEnumOptions();
message.allowAlias = object.allowAlias ?? false;
message.deprecated = object.deprecated ?? false;
+ message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -4230,7 +4531,7 @@ export const GeneratedCodeInfo = {
};
function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation {
- return { path: [], sourceFile: "", begin: 0, end: 0 };
+ return { path: [], sourceFile: "", begin: 0, end: 0, semantic: 0 };
}
export const GeneratedCodeInfo_Annotation = {
@@ -4249,6 +4550,9 @@ export const GeneratedCodeInfo_Annotation = {
if (message.end !== 0) {
writer.uint32(32).int32(message.end);
}
+ if (message.semantic !== 0) {
+ writer.uint32(40).int32(message.semantic);
+ }
return writer;
},
@@ -4296,6 +4600,13 @@ export const GeneratedCodeInfo_Annotation = {
message.end = reader.int32();
continue;
+ case 5:
+ if (tag != 40) {
+ break;
+ }
+
+ message.semantic = reader.int32() as any;
+ continue;
}
if ((tag & 7) == 4 || tag == 0) {
break;
@@ -4311,6 +4622,7 @@ export const GeneratedCodeInfo_Annotation = {
sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "",
begin: isSet(object.begin) ? Number(object.begin) : 0,
end: isSet(object.end) ? Number(object.end) : 0,
+ semantic: isSet(object.semantic) ? generatedCodeInfo_Annotation_SemanticFromJSON(object.semantic) : 0,
};
},
@@ -4324,6 +4636,7 @@ export const GeneratedCodeInfo_Annotation = {
message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile);
message.begin !== undefined && (obj.begin = Math.round(message.begin));
message.end !== undefined && (obj.end = Math.round(message.end));
+ message.semantic !== undefined && (obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic));
return obj;
},
@@ -4337,6 +4650,7 @@ export const GeneratedCodeInfo_Annotation = {
message.sourceFile = object.sourceFile ?? "";
message.begin = object.begin ?? 0;
message.end = object.end ?? 0;
+ message.semantic = object.semantic ?? 0;
return message;
},
};
diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.ts
index 4d0d7bd177..d9128df868 100644
--- a/frontend/src/types/proto/v1/database_service.ts
+++ b/frontend/src/types/proto/v1/database_service.ts
@@ -529,12 +529,12 @@ export interface ListSlowQueriesRequest {
filter: string;
/**
* The order by of the slow query log.
- * Support order by count, latest_log_time, average_query_time, nighty_fifth_percentile_query_time,
- * average_rows_sent, nighty_fifth_percentile_rows_sent, average_rows_examined, nighty_fifth_percentile_rows_examined for now.
+ * Support order by count, latest_log_time, average_query_time, maximum_query_time,
+ * average_rows_sent, maximum_rows_sent, average_rows_examined, maximum_rows_examined for now.
* For example:
* - order by count: order_by = "count"
* - order by latest_log_time desc: order_by = "latest_log_time desc"
- * Default: order by nighty_fifth_percentile_query_time desc.
+ * Default: order by average_query_time desc.
*/
orderBy: string;
}
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 486feecabc..56641c430c 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -1515,7 +1515,7 @@ ListSlowQueriesRequest is the request of listing slow query.
| ----- | ---- | ----- | ----------- |
| parent | [string](#string) | | Format: environments/{environment}/instances/{instance}/databases/{database} |
| filter | [string](#string) | | The filter of the slow query log. follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax. Support filter by project and start_time in SlowQueryDetails for now. For example: Search the slow query log of the specific project: - the specific project: project = "projects/{project}" Search the slow query log that start_time after 2022-01-01T12:00:00.000Z: - start_time > "2022-01-01T12:00:00.000Z" - Should use [RFC-3339 format](https://www.rfc-editor.org/rfc/rfc3339). - Currently we only support filtering down to date granularity. |
-| order_by | [string](#string) | | The order by of the slow query log. Support order by count, latest_log_time, average_query_time, nighty_fifth_percentile_query_time, average_rows_sent, nighty_fifth_percentile_rows_sent, average_rows_examined, nighty_fifth_percentile_rows_examined for now. For example: - order by count: order_by = "count" - order by latest_log_time desc: order_by = "latest_log_time desc" Default: order by nighty_fifth_percentile_query_time desc. |
+| order_by | [string](#string) | | The order by of the slow query log. Support order by count, latest_log_time, average_query_time, maximum_query_time, average_rows_sent, maximum_rows_sent, average_rows_examined, maximum_rows_examined for now. For example: - order by count: order_by = "count" - order by latest_log_time desc: order_by = "latest_log_time desc" Default: order by average_query_time desc. |
diff --git a/proto/generated-go/v1/database_service.pb.go b/proto/generated-go/v1/database_service.pb.go
index 0d80094023..b200e78618 100644
--- a/proto/generated-go/v1/database_service.pb.go
+++ b/proto/generated-go/v1/database_service.pb.go
@@ -2158,13 +2158,13 @@ type ListSlowQueriesRequest struct {
// - Currently we only support filtering down to date granularity.
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// The order by of the slow query log.
- // Support order by count, latest_log_time, average_query_time, nighty_fifth_percentile_query_time,
- // average_rows_sent, nighty_fifth_percentile_rows_sent, average_rows_examined, nighty_fifth_percentile_rows_examined for now.
+ // Support order by count, latest_log_time, average_query_time, maximum_query_time,
+ // average_rows_sent, maximum_rows_sent, average_rows_examined, maximum_rows_examined for now.
// For example:
// - order by count: order_by = "count"
// - order by latest_log_time desc: order_by = "latest_log_time desc"
//
- // Default: order by nighty_fifth_percentile_query_time desc.
+ // Default: order by average_query_time desc.
OrderBy string `protobuf:"bytes,3,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
}
diff --git a/proto/v1/database_service.proto b/proto/v1/database_service.proto
index 32b397be68..66a7484ebe 100644
--- a/proto/v1/database_service.proto
+++ b/proto/v1/database_service.proto
@@ -535,12 +535,12 @@ message ListSlowQueriesRequest {
string filter = 2;
// The order by of the slow query log.
- // Support order by count, latest_log_time, average_query_time, nighty_fifth_percentile_query_time,
- // average_rows_sent, nighty_fifth_percentile_rows_sent, average_rows_examined, nighty_fifth_percentile_rows_examined for now.
+ // Support order by count, latest_log_time, average_query_time, maximum_query_time,
+ // average_rows_sent, maximum_rows_sent, average_rows_examined, maximum_rows_examined for now.
// For example:
// - order by count: order_by = "count"
// - order by latest_log_time desc: order_by = "latest_log_time desc"
- // Default: order by nighty_fifth_percentile_query_time desc.
+ // Default: order by average_query_time desc.
string order_by = 3;
}