Before you delete a table group, make sure that it contains no table. Specifically, you need to delete the tables from the table group or clear the table group attributes of the tables.
Example:
obclient> show tablegroups;
+-----------------+------------+---------------+
| Tablegroup_name | Table_name | Database_name |
+-----------------+------------+---------------+
| oceanbase | NULL | NULL |
| tpcc_group | cust | tpccdb |
| tpcc_group | dist | tpccdb |
| tpcc_group | hist | tpccdb |
| tpcc_group | nord | tpccdb |
| tpcc_group | ordl | tpccdb |
| tpcc_group | ordr | tpccdb |
| tpcc_group | stok | tpccdb |
| tpcc_group | ware | tpccdb |
+-----------------+------------+---------------+
9 rows in set (0.01 sec)
obclient> drop tablegroup tpcc_group;
ERROR 4615 (HY000): tablegroup is not empty
obclient>