diff --git a/src/components/InputSection.tsx b/src/components/InputSection.tsx index bea8cce..c4fe6ac 100644 --- a/src/components/InputSection.tsx +++ b/src/components/InputSection.tsx @@ -10,15 +10,39 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; export interface ColumnType { name: string; type: string; } -const DUCKDB_TYPES = ["INTEGER", "DOUBLE", "BOOLEAN", "TEXT"]; +const DUCKDB_TYPES = [ + // Numeric Types + "TINYINT", "SMALLINT", "INTEGER", "BIGINT", "HUGEINT", + "UTINYINT", "USMALLINT", "UINTEGER", "UBIGINT", "UHUGEINT", + "DECIMAL", "FLOAT", "DOUBLE", + // String Types + "VARCHAR", "TEXT", "CHAR", "BIT", + // Boolean Type + "BOOLEAN", + // Date/Time Types + "DATE", "TIME", "TIMESTAMP", "TIMESTAMP WITH TIME ZONE", "INTERVAL", + // Binary Types + "BLOB", "BYTEA", "BINARY", "VARBINARY", + // Other Types + "UUID", "JSON", + // Nested Types + "ARRAY", "LIST", "MAP", "STRUCT", "UNION" +]; interface InputSectionProps { - editorRef: React.MutableRefObject; + editorRef: React.RefObject; runQuery: () => void; handleFileUpload: (event: React.ChangeEvent) => void; csvPreview: Record[]; @@ -179,17 +203,21 @@ const InputSection: React.FC = ({ {Object.keys(csvPreview[0] || {}).map((column, index) => ( {column} - + + + + + {DUCKDB_TYPES.map((type) => ( + + {type} + + ))} + + ))}