You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
MCOL-1052: Skeleton for group_by_handler for CS.
This commit is contained in:
@@ -123,6 +123,9 @@ static int calpont_rollback(handlerton* hton, THD* thd, bool all);
|
||||
static int calpont_close_connection ( handlerton* hton, THD* thd );
|
||||
handlerton* calpont_hton;
|
||||
|
||||
static group_by_handler *
|
||||
create_calpont_group_by_handler(THD *thd, Query *query);
|
||||
|
||||
/* Variables for example share methods */
|
||||
|
||||
/*
|
||||
@@ -218,6 +221,7 @@ static int columnstore_init_func(void* p)
|
||||
calpont_hton->commit = calpont_commit;
|
||||
calpont_hton->rollback = calpont_rollback;
|
||||
calpont_hton->close_connection = calpont_close_connection;
|
||||
calpont_hton->create_group_by = create_calpont_group_by_handler;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
@@ -1135,6 +1139,22 @@ static MYSQL_SYSVAR_ULONG(
|
||||
0);
|
||||
#endif
|
||||
|
||||
static group_by_handler *
|
||||
create_calpont_group_by_handler(THD *thd, Query *query)
|
||||
{
|
||||
ha_calpont_group_by_handler *handler;
|
||||
Item *item;
|
||||
List_iterator_fast<Item> it(*query->select);
|
||||
|
||||
handler= new ha_calpont_group_by_handler(thd, query->select, query->from);
|
||||
return handler;
|
||||
}
|
||||
|
||||
int ha_calpont_group_by_handler::next_row()
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
static struct st_mysql_sys_var* calpont_system_variables[] =
|
||||
{
|
||||
// MYSQL_SYSVAR(enum_var),
|
||||
|
@@ -40,6 +40,8 @@
|
||||
#include <my_config.h>
|
||||
#include "idb_mysql.h"
|
||||
|
||||
extern handlerton* calpont_hton;
|
||||
|
||||
/** @brief
|
||||
EXAMPLE_SHARE is a structure that will be shared among all open handlers.
|
||||
This example implements the minimum of what you will probably need.
|
||||
@@ -245,5 +247,22 @@ public:
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class ha_calpont_group_by_handler: public group_by_handler
|
||||
{
|
||||
List<Item> *fields;
|
||||
TABLE_LIST *table_list;
|
||||
bool first_row;
|
||||
|
||||
public:
|
||||
ha_calpont_group_by_handler(THD *thd_arg, List<Item> *fields_arg,
|
||||
TABLE_LIST *table_list_arg)
|
||||
: group_by_handler(thd_arg, calpont_hton), fields(fields_arg),
|
||||
table_list(table_list_arg) {}
|
||||
~ha_calpont_group_by_handler() {}
|
||||
int init_scan() { first_row= true ; return 0; }
|
||||
int next_row();
|
||||
int end_scan() { return 0; }
|
||||
};
|
||||
#endif //HA_CALPONT_H__
|
||||
|
||||
|
Reference in New Issue
Block a user