5714 Invalid partitioning expression for PARTITION BY.
A partitioning expression must be deterministic and based on one or more columns in the table (these columns are called the partitioning columns). Conditional expressions in a partitioning expression which compare character data must not contain columns or expressions using CHARACTER SET KANJI1 or KANIJSJIS. Expressions and columns referenced in a partitioning expression must not have BLOB, CLOB, or user-defined data types. It must not contain built-in functions (such as TIME, ACCOUNT, etc.) other than DATE, CURRENT_DATE, and CURRENT_TIMESTAMP. It must also not contain user-defined functions, the RANDOM function, aggregate functions (such as COUNT, AVERAGE, etc.), grouped-row OLAP functions (such as MAVG, MSUM, etc.), attribute functions (BYTES, CHARACTERS, FORMAT, etc.), HASHAMP function, or HASHBAKAMP function. ROWID system-derived columns, PARTITION[#Ln] system-derived columns , set operators, and subqueries are not allowed. Certain uses of EXTRACT, CAST, Teradata conversion, and AT clause are also not allowed when they are not deterministic. The partitioning expression may contain HASHROW and HASHBUCKET functions.
Other limits will be exceeded (such as the request text size limit) before this limit is exceeded.
Examine the SQL statement and verify that the request is correct. Change the statement to adhere to the partitioned primary index rules and resubmit the request.