prestodb/presto · error · PrestoException

INVALID_TABLE_PROPERTY

INVALID_TABLE_PROPERTY

Error message

use_timestamp_based_staleness cannot be explicitly set to false when cross_catalog_materialized_views_enabled is true

What it means

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.

Source

Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java:1981

                icebergTableHandle.getTable().getIcebergTableName().getSnapshotId(),
                outputPath.get()));
    }

    @Override
    public void createMaterializedView(
            ConnectorSession session,
            ConnectorTableMetadata viewMetadata,
            MaterializedViewDefinition viewDefinition,
            boolean ignoreExisting)
    {
        shouldRunInAutoCommitTransaction("CREATE MATERIALIZED VIEW");
        validateNoBranchInBaseTables(viewDefinition.getBaseTables(), "CREATE MATERIALIZED VIEW");
        SchemaTableName viewName = viewMetadata.getTable();
        Map<String, Object> materializedViewProperties = viewMetadata.getProperties();
        boolean crossCatalogEnabled = isCrossCatalogEnabled(materializedViewProperties);
        Optional<Boolean> useTimestampBased = getUseTimestampBasedStaleness(materializedViewProperties);
        if (crossCatalogEnabled && useTimestampBased.isPresent() && !useTimestampBased.get()) {
            throw new PrestoException(INVALID_TABLE_PROPERTY,
                    "use_timestamp_based_staleness cannot be explicitly set to false when cross_catalog_materialized_views_enabled is true");
        }
        try {
            SchemaTableName storageTableName = getStorageTableName(session, viewName, materializedViewProperties);

            if (viewExists(session, viewMetadata)) {
                if (ignoreExisting) {
                    return;
                }
                throw new PrestoException(ALREADY_EXISTS, "Materialized view " + viewName + " already exists");
            }

            ConnectorTableMetadata storageTableMetadata = new ConnectorTableMetadata(
                    storageTableName,
                    viewMetadata.getColumns(),
                    materializedViewProperties,
                    viewMetadata.getComment());

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Remove the use_timestamp_based_staleness=false property from the CREATE MATERIALIZED VIEW statement
  2. Or disable cross_catalog_materialized_views_enabled in the Iceberg connector configuration
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java:1981 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/1650959a98813aa9. Report an issue: GitHub.