Skip to content

Commit 0c6850f

Browse files
committed
Improved some booleans types
1 parent 8ea1f10 commit 0c6850f

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

apps/webapp/app/components/code/TSQLResultsTable.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ function isNumericType(type: string): boolean {
6060
* Check if a ClickHouse type is a boolean type
6161
*/
6262
function isBooleanType(type: string): boolean {
63-
return (
64-
type === "Bool" || type === "UInt8" || type === "Nullable(Bool)" || type === "Nullable(UInt8)"
65-
);
63+
return type === "Bool" || type === "Nullable(Bool)";
6664
}
6765

6866
/**

apps/webapp/app/v3/querySchemas.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,14 @@ export const runsSchema: TableSchema = {
6969
example: "PRODUCTION",
7070
}),
7171
},
72-
attempt: {
73-
name: "attempt",
74-
...column("UInt8", { description: "Number of attempts (starts at 1)", example: "1" }),
72+
attempt_count: {
73+
name: "attempt_count",
74+
clickhouseName: "attempt",
75+
...column("UInt8", {
76+
description: "Number of attempts (starts at 1)",
77+
example: "1",
78+
customRenderType: "number",
79+
}),
7580
},
7681
status: {
7782
name: "status",
@@ -138,12 +143,12 @@ export const runsSchema: TableSchema = {
138143
is_root_run: {
139144
name: "is_root_run",
140145
...column("UInt8", { description: "Whether this is a root run (0 or 1)", example: "0" }),
141-
expression: "if(depth = 0, 1, 0)",
146+
expression: "if(depth = 0, true, false)",
142147
},
143148
is_child_run: {
144149
name: "is_child_run",
145150
...column("UInt8", { description: "Whether this is a child run (0 or 1)", example: "0" }),
146-
expression: "if(depth > 0, 1, 0)",
151+
expression: "if(depth > 0, true, false)",
147152
},
148153

149154
// Telemetry
@@ -320,6 +325,7 @@ export const runsSchema: TableSchema = {
320325
is_test: {
321326
name: "is_test",
322327
...column("UInt8", { description: "Whether this is a test run (0 or 1)", example: "0" }),
328+
expression: "if(is_test > 0, true, false)",
323329
},
324330

325331
// Virtual columns

0 commit comments

Comments
 (0)