diff --git a/apps/webapp/app/components/code/TSQLResultsTable.tsx b/apps/webapp/app/components/code/TSQLResultsTable.tsx
index 90cc78f14..085aa9f0a 100644
--- a/apps/webapp/app/components/code/TSQLResultsTable.tsx
+++ b/apps/webapp/app/components/code/TSQLResultsTable.tsx
@@ -196,6 +196,24 @@ function CellValue({
return {String(value)};
}
+/**
+ * Check if a column should be right-aligned (numeric columns, duration, cost)
+ */
+function isRightAlignedColumn(column: OutputColumnMetadata): boolean {
+ // Check for custom render types that display numeric values
+ if (column.customRenderType === "duration" || column.customRenderType === "cost") {
+ return true;
+ }
+
+ // Check for numeric types (excluding UInt8 which is often used for booleans)
+ const { type } = column;
+ if (type === "UInt8" || type === "Nullable(UInt8)") {
+ return false;
+ }
+
+ return isNumericType(type);
+}
+
export function TSQLResultsTable({
rows,
columns,
@@ -212,7 +230,10 @@ export function TSQLResultsTable({
{columns.map((col) => (
-
+
{col.description ? (
(
{columns.map((col) => (
-
+