{"record":{"id":"2b8d612c5215dec5","repo":"prestodb/presto","slug":"not-supported-2b8d61","errorCode":"NOT_SUPPORTED","errorMessage":"Unsupported column type: ","messagePattern":"Unsupported column type: ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-singlestore/src/main/java/com/facebook/presto/plugin/singlestore/SingleStoreClient.java","lineNumber":140,"sourceCode":"                new String[] {\"TABLE\", \"VIEW\"});\n    }\n\n    @Override\n    protected String getTableSchemaName(ResultSet resultSet)\n            throws SQLException\n    {\n        return resultSet.getString(\"TABLE_CAT\");\n    }\n\n    @Override\n    protected String toSqlType(Type type)\n    {\n        if (REAL.equals(type)) {\n            return \"float\";\n        }\n        if (TIME_WITH_TIME_ZONE.equals(type) ||\n                TIMESTAMP_WITH_TIME_ZONE.equals(type) || UUID.equals(type)) {\n            throw new PrestoException(NOT_SUPPORTED, \"Unsupported column type: \" + type.getDisplayName());\n        }\n        if (TIMESTAMP.equals(type)) {\n            return \"datetime\";\n        }\n        if (VARBINARY.equals(type)) {\n            return \"mediumblob\";\n        }\n        if (isVarcharType(type)) {\n            VarcharType varcharType = (VarcharType) type;\n            if (varcharType.isUnbounded()) {\n                return \"longtext\";\n            }\n            if (varcharType.getLengthSafe() <= 21844) {\n                return super.toSqlType(type);\n            }\n            if (varcharType.getLengthSafe() <= 16777215) {\n                return \"mediumtext\";\n            }","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-singlestore/src/main/java/com/facebook/presto/plugin/singlestore/SingleStoreClient.java#L122-L158","documentation":"The SingleStore connector cannot map the given Presto (SPI) column type to any SingleStore SQL type in toSqlType. Types time with time zone, timestamp with time zone, and UUID have no supported SingleStore equivalent and are explicitly rejected with NOT_SUPPORTED. The error surfaces during DDL translation (CREATE TABLE/AS SELECT) involving such columns.","triggerScenarios":"Executing CREATE TABLE or CREATE TABLE AS in the singlestore catalog with a column of type time with time zone, timestamp with time zone, or uuid; or inserting query results containing these types into a SingleStore table.","commonSituations":"Migrating schemas from engines that support these types (e.g. Postgres timestamptz/uuid) into SingleStore via Presto CTAS; joins/queries producing timestamp with time zone from other connectors being written to SingleStore.","solutions":["Change the table schema to use timestamp (without time zone) or time instead of the *with time zone* variants, normalizing to a fixed zone in the query","Cast uuid columns to varchar before writing, and store them as varchar in SingleStore","Use CAST in the CTAS/INSERT query so no unsupported type reaches the connector's type mapping"],"exampleFix":"-- before\nCREATE TABLE singlestore.db.t AS SELECT cast(ts as timestamp with time zone) AS ts FROM src;\n-- after\nCREATE TABLE singlestore.db.t AS SELECT with_timezone_cast(ts, 'UTC') AS ts FROM src; -- or cast to plain timestamp\n-- alternative: CAST(uuid_col AS VARCHAR)","handlingStrategy":"validation","validationCode":"static final Set<TypeSignature> UNSUPPORTED = Set.of(timeWithTimeZone, timestampWithTimeZone, uuid);\n// before CTAS/INSERT, check result column types\nfor (Column c : resultColumns) {\n    if (UNSUPPORTED.contains(c.getType().getTypeSignature()))\n        throw new IllegalArgumentException(\"Cast column \" + c.getName() + \" before writing to SingleStore\");\n}","typeGuard":"boolean isSingleStoreWritable(Type type) {\n    String name = type.getTypeSignature().getBase().toString();\n    return !(name.equals(\"time with time zone\")\n        || name.equals(\"timestamp with time zone\")\n        || name.equals(\"uuid\"));\n}","tryCatchPattern":"try {\n    execute(ctasSql);\n} catch (PrestoException e) {\n    if (\"NOT_SUPPORTED\".equals(e.getErrorCode().getName()) && e.getMessage().startsWith(\"Unsupported column type\")) {\n        // rewrite query with casts and retry once\n    } else throw e;\n}","preventionTips":["Audit source schemas for timestamptz/uuid columns before migrating to SingleStore","Insert explicit CASTs to timestamp/varchar in CTAS and INSERT queries","Keep a mapping table of Presto-to-SingleStore types for your pipeline"],"tags":["singlestore","connector","types","ddl"],"backgroundTag":"unsupported-column-type","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}