Partitioned table: is of a not allowed type for this type of partitioning

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 分区表 :is of a not allowed type for this type of partitioning

| username: 爱白话的晓辉

When creating a partitioned table, using the varchar type for hashing results in the above error. Is hashing by string type not supported?

| username: TiDBer_jYQINSnf | Original post link

When using hash partitioning, you need to add PARTITION BY HASH (expr) after CREATE TABLE, where expr is an expression that returns an integer.

| username: Mark | Original post link

You can try using Range Columns to support non-integer columns as partition columns.

| username: Mark | Original post link

This is related to partitioning and collation rules. You can refer to the official documentation on partitioned tables.

| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.