{"record":{"id":"8d5484ab1f262543","repo":"prestodb/presto","slug":"invalid-table-property-8d5484","errorCode":"INVALID_TABLE_PROPERTY","errorMessage":"Distribute columns not defined on table: ","messagePattern":"Distribute columns not defined on table: ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-blackhole/src/main/java/com/facebook/presto/plugin/blackhole/BlackHoleMetadata.java","lineNumber":191,"sourceCode":"        ConnectorOutputTableHandle outputTableHandle = beginCreateTable(session, tableMetadata, Optional.empty());\n        finishCreateTable(session, outputTableHandle, ImmutableList.of(), ImmutableList.of());\n    }\n\n    @Override\n    public Optional<ConnectorNewTableLayout> getNewTableLayout(ConnectorSession connectorSession, ConnectorTableMetadata tableMetadata)\n    {\n        List<String> distributeColumns = (List<String>) tableMetadata.getProperties().get(DISTRIBUTED_ON);\n        if (distributeColumns.isEmpty()) {\n            return Optional.empty();\n        }\n\n        Set<String> undefinedColumns = Sets.difference(\n                ImmutableSet.copyOf(distributeColumns),\n                tableMetadata.getColumns().stream()\n                        .map(ColumnMetadata::getName)\n                        .collect(toSet()));\n        if (!undefinedColumns.isEmpty()) {\n            throw new PrestoException(INVALID_TABLE_PROPERTY, \"Distribute columns not defined on table: \" + undefinedColumns);\n        }\n\n        return Optional.of(new ConnectorNewTableLayout(BlackHolePartitioningHandle.INSTANCE, distributeColumns));\n    }\n\n    @Override\n    public ConnectorOutputTableHandle beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, Optional<ConnectorNewTableLayout> layout)\n    {\n        checkSchemaExists(tableMetadata.getTable().getSchemaName());\n        int splitCount = (Integer) tableMetadata.getProperties().get(SPLIT_COUNT_PROPERTY);\n        int pagesPerSplit = (Integer) tableMetadata.getProperties().get(PAGES_PER_SPLIT_PROPERTY);\n        int rowsPerPage = (Integer) tableMetadata.getProperties().get(ROWS_PER_PAGE_PROPERTY);\n        int fieldsLength = (Integer) tableMetadata.getProperties().get(FIELD_LENGTH_PROPERTY);\n\n        if (splitCount < 0) {\n            throw new PrestoException(INVALID_TABLE_PROPERTY, SPLIT_COUNT_PROPERTY + \" property is negative\");\n        }\n        if (pagesPerSplit < 0) {","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-blackhole/src/main/java/com/facebook/presto/plugin/blackhole/BlackHoleMetadata.java#L173-L209","documentation":"Fires in getNewTableLayout when a distribute_columns (distributed_on) table property lists column names that do not match any column of the table being created. The user supplied an invalid distribution column in the table properties.","triggerScenarios":"Thrown at presto-blackhole/src/main/java/com/facebook/presto/plugin/blackhole/BlackHoleMetadata.java:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check spelling of the column names in the distributed_on table property","Add the missing columns to the table definition","Remove the distributed_on property if distribution is not needed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}