Skip to content

LogAttribute parameters autocomplete is not working #2163

Closed

Description

@czephyr

It looks like autocomplete for attribute names is not working right.
Some fields in LogAttributes will never get suggested for search and will never appear in the available filters even when the number of filters to fetch is high (its 1000 in the example).

Example: A log has the attribute "organization" in its LogAttribute structure.
Image

The autocomplete is not suggesting the "organization" attribute.
Image
The filters for LogAttribute show a very small subset of all the LogAttribute attributes even when the amount of filters to be fetched is 1000.
The "organization" attribute is not there and also all the other _usage params are not there.
Image

Activity

  1. czephyr commented on Apr 24, 2026

    @czephyr
    Author

    Possibly #2128 will help

  2. knudtty commented on May 6, 2026

    @knudtty
    Contributor

    That PR will get us part of the way there, I have a follow on planned that will enable those MVs to be used also for filters.

    Introspection queries are really intensive, it's actually a quite difficult problem. MVs should trivialize the problem of fetching all values as part of a set. Subsets may still be difficult, but we'll introduce a toggle that allows you to still surface the "exact" values.

  3. czephyr commented on May 6, 2026

    @czephyr
    Author

    Great to see there is interest in making this work better. Thanks for the good work.

  4. czephyr commented on Jun 1, 2026

    @czephyr
    Author

    Tracking #2297 and #2376 as relevant

  5. knudtty commented on Jun 2, 2026

    @knudtty
    Contributor

    Hey @czephyr, wanted to let you know that there are some MVs you could add today to assist. It'll require you running some SQL on your CH instance and modifying your source in your team settings.

    The file can be found here. #2128 is where the MVs were added, there's a video showing how you can add to the source.

  6. czephyr commented on Jun 3, 2026

    @czephyr
    Author

    I've added the MVs to my deployment making them ReplicatedSummingMergeTree and pointing the HDX metadata tables to the distributed version of them.

    I'm running into this error:

    Code: 70. DB::Exception: Received from localhost:9000. DB::Exception: Conversion from AggregateFunction(groupUniqArray(20), String) to AggregateFunction(groupUniqArray(20), String) is not supported: While executing Remote. (CANNOT_CONVERT_TYPE)
    

    It looks like HDX is trying to execute this:

    SELECT
        ColumnIdentifier,
        Key,
        groupUniqArray(_CAST(20, 'Int32'))(Value) AS Values
    FROM logs.distributed_otel_logs_kv_rollup_15m
    WHERE Value != ''
    GROUP BY
        ColumnIdentifier,
        Key
    ORDER BY
        ColumnIdentifier = 'NativeColumn' DESC,
        ColumnIdentifier ASC,
        Key ASC
    LIMIT _CAST(30, 'Int32')
    

    By removing the cast to groupUniqArray(20)(Value) AS Values this query works.

  7. czephyr commented on Jun 15, 2026

    @czephyr
    Author

    @knudtty just tagging as a ping, this should be a super easy fix probably

  8. knudtty commented on Jun 15, 2026

    @knudtty
    Contributor

    What version of ClickHouse are you on? Is there anything odd about your schema?

  9. czephyr commented on Jun 15, 2026

    @czephyr
    Author

    What version of ClickHouse are you on? Is there anything odd about your schema?

    I've used ReplicatedSummingMergeTree to create the metadata tables and then pointed HDX to the distributed table built on top. Clickhouse version 26.3.2.3.

    As reported in the log from the previous comment, when the query is ran manually it works with no problems so the problem is not with the logic of the tables.
    The query version using the cast ran by the HDX code wont work on distributed tables

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions