Skip to content

A peephole optimization: if someone requesting a tuple of attributes from a dictionary and immediately takes only one, don't request others. #50167

@alexey-milovidov

Description

@alexey-milovidov

Use case

dictGet(
        'ip_trie',
        ('country_code', 'latitude', 'longitude'),
        tuple(ip)
    ).1 as country,

Motivation: https://clickhouse.com/blog/geolocating-ips-in-clickhouse-and-grafana

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions