Skip to content

[Feature][Vectorized] support function topn && remove some unused code #7792

@BiteTheDDDDt

Description

@BiteTheDDDDt

Search before asking

  • I had searched in the issues and found no similar issues.

Description

  1. support function topn
  2. remove unused header
  3. remove get_header_file_path() and get_address_of_add_function()

Use case

MySQL [tpch]> set enable_vectorized_engine = false;
Query OK, 0 rows affected (0.001 sec)

MySQL [tpch]> select topn(l_linestatus,5,10) from lineitem;
+-----------------------------+
| topn(`l_linestatus`, 5, 10) |
+-----------------------------+
| {"F":29998258,"O":29987794} |
+-----------------------------+
1 row in set (5.264 sec)

MySQL [tpch]> set enable_vectorized_engine = true;
Query OK, 0 rows affected (0.001 sec)

MySQL [tpch]> select topn(l_linestatus,5,10) from lineitem;
+-----------------------------+
| topn(`l_linestatus`, 5, 10) |
+-----------------------------+
| {"F":29998258,"O":29987794} |
+-----------------------------+
1 row in set (2.075 sec)

MySQL [tpch]> set enable_vectorized_engine = false;
Query OK, 0 rows affected (0.001 sec)

MySQL [tpch]> select topn(l_partkey,3) from lineitem;
+-----------------------------------------+
| topn(`l_partkey`, 3)                    |
+-----------------------------------------+
| {"304540":58,"1090021":58,"1457334":57} |
+-----------------------------------------+
1 row in set (34.988 sec)

MySQL [tpch]> set enable_vectorized_engine = true;
Query OK, 0 rows affected (0.001 sec)

MySQL [tpch]> select topn(l_partkey,3) from lineitem;
+----------------------------------------+
| topn(`l_partkey`, 3)                   |
+----------------------------------------+
| {"304540":58,"1090021":58,"782803":57} |
+----------------------------------------+
1 row in set (18.057 sec)

Related issues

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions