public void dropColumn()

in paimon-trino-common/src/main/java/org/apache/paimon/trino/TrinoMetadataBase.java [316:330]


    public void dropColumn(
            ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle column) {
        TrinoTableHandle trinoTableHandle = (TrinoTableHandle) tableHandle;
        Identifier identifier =
                new Identifier(trinoTableHandle.getSchemaName(), trinoTableHandle.getTableName());
        TrinoColumnHandle trinoColumnHandle = (TrinoColumnHandle) column;
        List<SchemaChange> changes = new ArrayList<>();
        changes.add(SchemaChange.dropColumn(trinoColumnHandle.getColumnName()));
        try {
            catalog.alterTable(identifier, changes, false);
        } catch (Exception e) {
            throw new RuntimeException(
                    format("failed to alter table: '%s'", trinoTableHandle.getTableName()), e);
        }
    }