Skip to content

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

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 inset (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 inset (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 inset (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 inset (18.057 sec)

Related issues

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

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

    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