{"record":{"id":"1650959a98813aa9","repo":"prestodb/presto","slug":"invalid-table-property-165095","errorCode":"INVALID_TABLE_PROPERTY","errorMessage":"use_timestamp_based_staleness cannot be explicitly set to false when cross_catalog_materialized_views_enabled is true","messagePattern":"use_timestamp_based_staleness cannot be explicitly set to false when cross_catalog_materialized_views_enabled is true","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java","lineNumber":1981,"sourceCode":"                icebergTableHandle.getTable().getIcebergTableName().getSnapshotId(),\n                outputPath.get()));\n    }\n\n    @Override\n    public void createMaterializedView(\n            ConnectorSession session,\n            ConnectorTableMetadata viewMetadata,\n            MaterializedViewDefinition viewDefinition,\n            boolean ignoreExisting)\n    {\n        shouldRunInAutoCommitTransaction(\"CREATE MATERIALIZED VIEW\");\n        validateNoBranchInBaseTables(viewDefinition.getBaseTables(), \"CREATE MATERIALIZED VIEW\");\n        SchemaTableName viewName = viewMetadata.getTable();\n        Map<String, Object> materializedViewProperties = viewMetadata.getProperties();\n        boolean crossCatalogEnabled = isCrossCatalogEnabled(materializedViewProperties);\n        Optional<Boolean> useTimestampBased = getUseTimestampBasedStaleness(materializedViewProperties);\n        if (crossCatalogEnabled && useTimestampBased.isPresent() && !useTimestampBased.get()) {\n            throw new PrestoException(INVALID_TABLE_PROPERTY,\n                    \"use_timestamp_based_staleness cannot be explicitly set to false when cross_catalog_materialized_views_enabled is true\");\n        }\n        try {\n            SchemaTableName storageTableName = getStorageTableName(session, viewName, materializedViewProperties);\n\n            if (viewExists(session, viewMetadata)) {\n                if (ignoreExisting) {\n                    return;\n                }\n                throw new PrestoException(ALREADY_EXISTS, \"Materialized view \" + viewName + \" already exists\");\n            }\n\n            ConnectorTableMetadata storageTableMetadata = new ConnectorTableMetadata(\n                    storageTableName,\n                    viewMetadata.getColumns(),\n                    materializedViewProperties,\n                    viewMetadata.getComment());\n","sourceCodeStart":1963,"sourceCodeEnd":1999,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java#L1963-L1999","documentation":"During CREATE MATERIALIZED VIEW, materialized-view property validation enforces a consistency rule across connector config flags: if cross-catalog materialized views are enabled, the use_timestamp_based_staleness property may not be explicitly set to false, since staleness handling is governed by the cross-catalog feature; a conflicting property pair triggers this error.","triggerScenarios":"Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java:1981 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the use_timestamp_based_staleness=false property from the CREATE MATERIALIZED VIEW statement","Or disable cross_catalog_materialized_views_enabled in the Iceberg connector configuration"],"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-11T21:17:09.523Z"}