risingwavelabs/risingwave · error

Feature ` ` is not enabled at compile time. Please enable…

Error message

Feature `{}` is not enabled at compile time. Please enable it in `Cargo.toml` and rebuild.

What it means

Generated by the `decl_enable_feature!` macro in external_schema.rs:50: when the Cargo feature (e.g. `iceberg-catalog-rest`/`adbc`-related features for external schema support) is not enabled at compile time, a stub function is compiled in that always returns this anyhow error instead of the real implementation. It tells the user the binary was built without the feature needed to serve the external-schema lookup.

Solutions

  1. Rebuild RisingWave with the required feature enabled: add it to the crate's `features` and rebuild (e.g. `cargo build --features <feature>` or use the standard `./risedev build` profile).
  2. Switch to an official RisingWave release image that ships all external-source features enabled.
  3. Check which feature the failing function maps to in `decl_enable_feature!` usages in external_schema.rs and enable exactly that one.
  4. As a stopgap, use a connector path that does not require the feature (e.g. different catalog type or connector).

Example fix

// before (Cargo.toml)
[dependencies]
risingwave_frontend = { path = "../frontend" }
// after
cargo build -p risingwave_cmd_all --features frontend/iceberg-catalog-rest  # or use ./risedev build
Defensive patterns

Strategy: fallback

Validate before calling

// detect stubbed features at startup by probing the connector
async function featureAvailable(client, connector) {
  try { await client.execute(`CREATE SOURCE _probe WITH (connector='${connector}')`); return true; }
  catch (e) { return !String(e).includes('not enabled at compile time'); }
}

Try / catch

try {
  await createSource(connector, props);
} catch (e) {
  if (String(e).includes('not enabled at compile time')) {
    // fallback: use official full-featured image or rebuild with the feature
  } else { throw e; }
}

Prevention

When it happens

Trigger: Calling `CREATE SOURCE`/`CREATE TABLE ... WITH (connector='snowflake'|'iceberg')` (or any registered external-schema function) against a RisingWave binary compiled without the corresponding feature flag in `Cargo.toml`.

Common situations: Using a community build or a minimal Docker image where optional external-catalog features are compiled out; building locally without `--features`; CI profiles that trim features for size.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/9478ff91178afa4f. Report an issue: GitHub.

Appendix: source

Thrown at src/frontend/src/handler/create_source/external_schema.rs:50

/// Define a feature-gated function from a module.
///
/// This macro conditionally includes a module and re-exports a function from it.
/// When the feature is disabled, it generates a stub function that returns an error.
macro_rules! feature_gated_function {
    (
        mod $mod_name:ident,
        $feature_name:literal,
        async fn $func_name:ident ( $( $param_name:ident : $param_type:ty ),* $(,)? ) -> $ret_type:ty
    ) => {
        #[cfg(feature = $feature_name)]
        pub mod $mod_name;
        #[cfg(feature = $feature_name)]
        use $mod_name::$func_name;

        #[cfg(not(feature = $feature_name))]
        #[allow(unused_variables)]
        pub async fn $func_name( $( $param_name : $param_type ),* ) -> $ret_type {
            Err(anyhow::anyhow!(
                "Feature `{}` is not enabled at compile time. \
                Please enable it in `Cargo.toml` and rebuild.",
                $feature_name
            ))
        }
    };
}

feature_gated_function!(
    mod adbc_snowflake,
    "source-adbc_snowflake",
    async fn extract_adbc_snowflake_columns(
        with_properties: &WithOptionsSecResolved,
    ) -> anyhow::Result<Vec<ColumnCatalog>>
);

/// Resolves the schema of the source from external schema file.
/// See <https://docs.risingwave.com/sql/commands/sql-create-source> for more information.

View on GitHub (pinned to 6469eb736d)