Skip to content

Native engine crashes on all-literal RLIKE expression #3343

@andygrove

Description

@andygrove

Description

When Spark's ConstantFolding optimizer rule is disabled, an all-literal RLIKE expression reaches the native engine, which crashes with:

non scalar regexp patterns are not supported.

The error message is misleading — the issue is that both the input string and the pattern are scalar literals.

How to Reproduce

SET spark.sql.optimizer.excludedRules=org.apache.spark.sql.catalyst.optimizer.ConstantFolding;
SET spark.comet.regexp.allowIncompatible=true;
SELECT 'hello' RLIKE '^[a-z]+$';

Expected Behavior

The native engine should handle all-scalar RLIKE inputs gracefully — either by computing the correct result or by falling back to Spark.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcrashNative engine crash/panic/segfault

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions