aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Analyzer/Passes/ComparisonTupleEliminationPass.h
blob: 954a9d6a2f06981919095e31c1aa00aea6557b0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include <Analyzer/IQueryTreePass.h>

namespace DB
{

/** Rewrite tuples comparison into equivalent comparison of tuples arguments.
  *
  * Example: SELECT id FROM test_table WHERE (id, value) = (1, 'Value');
  * Result: SELECT id FROM test_table WHERE id = 1 AND value = 'Value';
  */
class ComparisonTupleEliminationPass final : public IQueryTreePass
{
public:
    String getName() override { return "ComparisonTupleEliminationPass"; }

    String getDescription() override { return "Rewrite tuples comparison into equivalent comparison of tuples arguments"; }

    void run(QueryTreeNodePtr query_tree_node, ContextPtr context) override;

};

}