Skip to content

"UTMMedium" field in the hits dataset causes a panic when performing SIMILAR TO. #15461

Closed

Description

@acking-you

Describe the bug

The "UTMMedium" field in the hits dataset causes a panic when performing SIMILAR TO.

To Reproduce

Execute the SQL below:

select count(*) from hits where "UTMMedium" SIMILAR TO 'email|social|banner';

And you will got a panic,like this:

thread 'tokio-runtime-worker' panicked at xxx/src/expressions/binary.rs:616:27:
compute_utf8_flag_op_scalar failed to downcast array

Expected behavior

SQL should work or at least return errors properly.

Additional context

  1. I tried to check the data and type of this field as follows:
> select arrow_typeof( "UTMMedium" )  from hits limit 1;
+------------------------------+
| arrow_typeof(hits.UTMMedium) |
+------------------------------+
| Utf8View                     |
+------------------------------+

> select "UTMMedium" from hits;
+---------------+
| UTMMedium     |
+---------------+
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
|               |
| cpc_marketing |
|               |
|               |
|               |
| cpc_marketing |
|               |
|               |
|               |
| cpc_marketing |
|               |
|               |
| .             |
| .             |
| .             |
+---------------+
99997497 row(s) fetched. (First 40 displayed. Use --maxrows to adjust)
  1. I'm using datafusion-cli for testing, version 46.01.

Activity

  1. psiayn commented on Mar 29, 2025

    @psiayn

    Hi, I was trying to reproduce this issue but I get a different error.

    I am using this as the dataset: https://datasets.clickhouse.com/hits_compatible/athena_partitioned/[hits_1.parquet](https://datasets.clickhouse.com/hits_compatible/athena_partitioned/hits_1.parquet)
    and using the latest 46.0.1 build from main.

    This is the error I am getting.......

    Image

    I hope I am using the correct dataset

  2. acking-you commented on Mar 29, 2025

    @acking-you
    ContributorAuthor

    I am using this as the dataset: [https://datasets.clickhouse.com/hits_compatible/athena_partitioned/hits_1.parquet](https://datasets.clickhouse.com/hits_compatible/athena_partitioned/%5Bhits_1.parquet%5D(https://datasets.clickhouse.com/hits_compatible/athena_partitioned/hits_1.parquet))
    and using the latest 46.0.1 build from main.

    The hits file I used is approximately 14GB in size, automatically downloaded via a datafusion script. Let me find the corresponding download link for you.
    Image

    May be that:https://datasets.clickhouse.com/hits_compatible/hits.parquet
    And reference code: https://github.com/apache/datafusion/blob/main/benchmarks/bench.sh#L473

  3. psiayn commented on Mar 29, 2025

    @psiayn

    Thank you, I will try with this

  4. psiayn commented on Mar 29, 2025

    @psiayn

    Trying with this data I am not getting any error.... The dataset is 14gb

    Image Image
  5. acking-you commented on Mar 29, 2025

    @acking-you
    ContributorAuthor

    Trying with this data I am not getting any error.... The dataset is 14gb

    Image Image

    Thank you very much for trying. If so, then this panic may be related to my machine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions