{"record":{"id":"439f34db21966b8b","repo":"prestodb/presto","slug":"invalid-table-property-439f34","errorCode":"INVALID_TABLE_PROPERTY","errorMessage":"Failed to convert object of type %s to expression: %s","messagePattern":"Failed to convert object of type (.+?) to expression: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/sql/rewrite/ShowQueriesRewrite.java","lineNumber":474,"sourceCode":"                return new BooleanLiteral(value.toString());\n            }\n\n            if (value instanceof Long || value instanceof Integer) {\n                return new LongLiteral(value.toString());\n            }\n\n            if (value instanceof Double) {\n                return new DoubleLiteral(value.toString());\n            }\n\n            if (value instanceof List) {\n                List<?> list = (List<?>) value;\n                return new ArrayConstructor(list.stream()\n                        .map(Visitor::toExpression)\n                        .collect(toList()));\n            }\n\n            throw new PrestoException(INVALID_TABLE_PROPERTY, format(\"Failed to convert object of type %s to expression: %s\", value.getClass().getName(), value));\n        }\n\n        @Override\n        protected Node visitShowCreate(ShowCreate node, Void context)\n        {\n            if (node.getType() == SCHEMA) {\n                CatalogSchemaName catalogSchemaName = createCatalogSchemaName(session, node, Optional.of(node.getName()), metadata);\n                if (!metadataResolver.schemaExists(catalogSchemaName)) {\n                    throw new SemanticException(MISSING_SCHEMA, node, \"Schema '%s' does not exist\", catalogSchemaName);\n                }\n\n                Map<String, Object> properties = metadata.getSchemaProperties(session, catalogSchemaName);\n                Map<String, PropertyMetadata<?>> allSchemaProperties = metadata.getSchemaPropertyManager().getAllProperties().get(getConnectorIdOrThrow(session, metadata, catalogSchemaName.getCatalogName()));\n                List<Property> propertyNodes = buildProperties(\"schema \" + catalogSchemaName, INVALID_SCHEMA_PROPERTY, properties, allSchemaProperties);\n                CreateSchema createSchema = new CreateSchema(\n                        node.getName(),\n                        false,\n                        propertyNodes);","sourceCodeStart":456,"sourceCodeEnd":492,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/sql/rewrite/ShowQueriesRewrite.java#L456-L492","documentation":"When building SHOW CREATE output, table/schema properties must be convertible to SQL expressions. Visitor.toExpression supports only primitive types and lists; any other property value type throws this PrestoException with INVALID_TABLE_PROPERTY.","triggerScenarios":"SHOW CREATE TABLE/SCHEMA on an object whose custom connector metadata properties contain a value type that is not a String, Boolean, number, or List (e.g. a Map or custom object returned by a connector's getTableProperties).","commonSituations":"Custom or third-party connectors storing non-primitive property values; property values that changed shape across connector/plugin versions; corrupted metadata from storage backends.","solutions":["Identify the connector producing the offending property via the %s type name in the message and update/fix the connector's property handling","Upgrade or patch the connector so property values conform to supported types (primitives or lists of primitives)","Drop/re-set the offending table or schema property so its stored value is convertible","If you control the plugin, convert unsupported values (e.g. maps) to supported serializations before returning them"],"exampleFix":"// before (connector property)\nproperties.put(\"dimensions\", ImmutableMap.of(\"w\", 10, \"h\", 20));\n// after\nproperties.put(\"dimensions\", ImmutableList.of(10, 20));","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    execute(\"SHOW CREATE TABLE \" + fqn);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getName().equals(\"INVALID_TABLE_PROPERTY\")) {\n        log.error(\"Connector returned an unconvertible property value; inspect connector: {}\", e.getMessage());\n    } else { throw e; }\n}","preventionTips":["Keep custom connectors limited to primitive/list property values","Test SHOW CREATE TABLE against all connector object shapes in CI","Pin connector/plugin versions and read changelogs for property type changes"],"tags":["sql","table-properties","connector","serialization"],"backgroundTag":"unsupported-table-property-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"}