Skip to content

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

chore: fix sort (#13818)

Liu Ji2e1cffed322b
diff --git a/frontend/src/utils/v1/sql.ts b/frontend/src/utils/v1/sql.ts
index bf528c3643..018f9c5353 100644
--- a/frontend/src/utils/v1/sql.ts
+++ b/frontend/src/utils/v1/sql.ts
@@ -179,11 +179,10 @@ export const compareQueryRowValues = (
// NULL or undefined values go behind
if (isNullOrUndefined(valueA)) return 1;
- if (isNullOrUndefined(valueB)) return 0;
+ if (isNullOrUndefined(valueB)) return -1;
if (Long.isLong(rawA) && Long.isLong(rawB)) {
- const cmp = rawA.compare(rawB);
- return cmp <= 0 ? 0 : 1;
+ return rawA.compare(rawB);
}
if (typeof valueA === "number" && typeof valueB === "number") {