Files
impala/testdata/workloads/functional-query/queries/QueryTest/insert_part_key.test
Zoltan Borok-Nagy eb8b118db5 IMPALA-10384: Make partition names consistent between BE and FE
In the BE we build partition names with the trailing char '/'. In the FE
we build partition names without a trailing char. We should make this
consistent because this causes some annoying string adjustments in
the FE and can cause hidden bugs.

This patch creates partition names without the trailing '/' both in
the BE and the FE. This follows Hive's behavior that also prints
partition names without the trailing '/'.

Testing:
 * Ran exhaustive tests

Change-Id: I7e40111e2d1148aeb01ebc985bbb15db7d6a6012
Reviewed-on: http://gerrit.cloudera.org:8080/16850
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2020-12-11 19:51:28 +00:00

20 lines
899 B
Plaintext

====
---- QUERY
# Pre IMPALA-875, IntLiterals with value 1 would be cast to TINYINT during analysis of
# the insert statement.
#
# In this example, we create a partitioned table with three partitions whose partition
# columns are equal when evaluated TINYINT (i.e. mod 1024). The backend will fail if
# more than one partition is considered a potential target for an INSERT when
# considering its statically specified partition keys.
DROP TABLE IF EXISTS functional.insert_partition_key_type_promotion;
CREATE TABLE functional.insert_partition_key_type_promotion (c int)
PARTITIONED BY (p int);
ALTER TABLE functional.insert_partition_key_type_promotion ADD PARTITION(p=1025);
ALTER TABLE functional.insert_partition_key_type_promotion ADD PARTITION(p=2049);
# Will fail pre IMPALA-875
INSERT INTO functional.insert_partition_key_type_promotion PARTITION(p=1) VALUES(1)
---- RESULTS
p=1: 1
====