Allow Raptor to run custom check before table creation
@@ -559,6 +559,8 @@ public class RaptorMetadata
throw new PrestoException(ALREADY_EXISTS, "View already exists: " + tableMetadata.getTable());
}
+ runExtraEligibilityCheck(session, tableMetadata);
+
Optional<RaptorPartitioningHandle> partitioning = layout
.map(ConnectorNewTableLayout::getPartitioning)
.map(RaptorPartitioningHandle.class::cast);
@@ -666,6 +668,11 @@ public class RaptorMetadata
return columnHandles.build();
}
+ protected void runExtraEligibilityCheck(ConnectorSession session, ConnectorTableMetadata tableMetadata)
+ {
+ // no-op
+ }
+
@Override
public Optional<ConnectorOutputMetadata> finishCreateTable(ConnectorSession session, ConnectorOutputTableHandle outputTableHandle, Collection<Slice> fragments, Collection<ComputedStatistics> computedStatistics)
{
