commit 9054fb92c47e1692ff6e8d1f288e887d4d3ab687 Author: Zoltan Haindrich Date: Mon Jul 30 13:54:29 2018 +0200 HIVE-21741 Backport HIVE-20221 & related fix HIVE-20833 to branch-3: Increase column width for partition_params Change-Id: I58c602c80649965986b8080c8a666fe40fa17821 diff --git a/itests/src/test/resources/testconfiguration.properties b/itests/src/test/resources/testconfiguration.properties index c80c841cf1..7de13fdfbd 100644 --- a/itests/src/test/resources/testconfiguration.properties +++ b/itests/src/test/resources/testconfiguration.properties @@ -444,6 +444,7 @@ minillaplocal.query.files=\ acid_vectorization_missing_cols.q,\ acid_vectorization_original.q,\ alter_merge_stats_orc.q,\ + alter_partition_change_col,\ authorization_view_8.q,\ auto_join30.q,\ auto_join_filters.q,\ diff --git a/ql/src/test/queries/clientpositive/alter_partition_change_col.q b/ql/src/test/queries/clientpositive/alter_partition_change_col.q index fe95176390..c207731208 100644 --- a/ql/src/test/queries/clientpositive/alter_partition_change_col.q +++ b/ql/src/test/queries/clientpositive/alter_partition_change_col.q @@ -79,3 +79,172 @@ describe alter_partition_change_col1 partition (p1='abc', p2='123'); describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123'); select * from alter_partition_change_col1 where p1='abc'; select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'; + +CREATE TABLE `alterPartTbl`( +col_1col_1col_1col_1col_1col_11 string, +col_1col_1col_1col_1col_1col_12 string, +col_1col_1col_1col_1col_1col_13 string, +col_1col_1col_1col_1col_1col_14 string, +col_1col_1col_1col_1col_1col_15 string, +col_1col_1col_1col_1col_1col_16 string, +col_1col_1col_1col_1col_1col_17 string, +col_1col_1col_1col_1col_1col_18 string, +col_1col_1col_1col_1col_1col_19 string, +col_1col_1col_1col_1col_1col_110 string, +col_1col_1col_1col_1col_1col_111 string, +col_1col_1col_1col_1col_1col_112 string, +col_1col_1col_1col_1col_1col_113 string, +col_1col_1col_1col_1col_1col_114 string, +col_1col_1col_1col_1col_1col_115 string, +col_1col_1col_1col_1col_1col_116 string, +col_1col_1col_1col_1col_1col_117 string, +col_1col_1col_1col_1col_1col_118 string, +col_1col_1col_1col_1col_1col_119 string, +col_1col_1col_1col_1col_1col_120 string, +col_1col_1col_1col_1col_1col_121 string, +col_1col_1col_1col_1col_1col_122 string, +col_1col_1col_1col_1col_1col_123 string, +col_1col_1col_1col_1col_1col_124 string, +col_1col_1col_1col_1col_1col_125 string, +col_1col_1col_1col_1col_1col_126 string, +col_1col_1col_1col_1col_1col_127 string, +col_1col_1col_1col_1col_1col_128 string, +col_1col_1col_1col_1col_1col_129 string, +col_1col_1col_1col_1col_1col_130 string, +col_1col_1col_1col_1col_1col_131 string, +col_1col_1col_1col_1col_1col_132 string, +col_1col_1col_1col_1col_1col_133 string, +col_1col_1col_1col_1col_1col_134 string, +col_1col_1col_1col_1col_1col_135 string, +col_1col_1col_1col_1col_1col_136 string, +col_1col_1col_1col_1col_1col_137 string, +col_1col_1col_1col_1col_1col_138 string, +col_1col_1col_1col_1col_1col_139 string, +col_1col_1col_1col_1col_1col_140 string, +col_1col_1col_1col_1col_1col_141 string, +col_1col_1col_1col_1col_1col_142 string, +col_1col_1col_1col_1col_1col_143 string, +col_1col_1col_1col_1col_1col_144 string, +col_1col_1col_1col_1col_1col_145 string, +col_1col_1col_1col_1col_1col_146 string, +col_1col_1col_1col_1col_1col_147 string, +col_1col_1col_1col_1col_1col_148 string, +col_1col_1col_1col_1col_1col_149 string, +col_1col_1col_1col_1col_1col_150 string, +col_1col_1col_1col_1col_1col_151 string, +col_1col_1col_1col_1col_1col_152 string, +col_1col_1col_1col_1col_1col_153 string, +col_1col_1col_1col_1col_1col_154 string, +col_1col_1col_1col_1col_1col_155 string, +col_1col_1col_1col_1col_1col_156 string, +col_1col_1col_1col_1col_1col_157 string, +col_1col_1col_1col_1col_1col_158 string, +col_1col_1col_1col_1col_1col_159 string, +col_1col_1col_1col_1col_1col_160 string, +col_1col_1col_1col_1col_1col_161 string, +col_1col_1col_1col_1col_1col_162 string, +col_1col_1col_1col_1col_1col_163 string, +col_1col_1col_1col_1col_1col_164 string, +col_1col_1col_1col_1col_1col_165 string, +col_1col_1col_1col_1col_1col_166 string, +col_1col_1col_1col_1col_1col_167 string, +col_1col_1col_1col_1col_1col_168 string, +col_1col_1col_1col_1col_1col_169 string, +col_1col_1col_1col_1col_1col_170 string, +col_1col_1col_1col_1col_1col_171 string, +col_1col_1col_1col_1col_1col_172 string, +col_1col_1col_1col_1col_1col_173 string, +col_1col_1col_1col_1col_1col_174 string, +col_1col_1col_1col_1col_1col_175 string, +col_1col_1col_1col_1col_1col_176 string, +col_1col_1col_1col_1col_1col_177 string, +col_1col_1col_1col_1col_1col_178 string, +col_1col_1col_1col_1col_1col_179 string, +col_1col_1col_1col_1col_1col_180 string, +col_1col_1col_1col_1col_1col_181 string, +col_1col_1col_1col_1col_1col_182 string, +col_1col_1col_1col_1col_1col_183 string, +col_1col_1col_1col_1col_1col_184 string, +col_1col_1col_1col_1col_1col_185 string, +col_1col_1col_1col_1col_1col_186 string, +col_1col_1col_1col_1col_1col_187 string, +col_1col_1col_1col_1col_1col_188 string, +col_1col_1col_1col_1col_1col_189 string, +col_1col_1col_1col_1col_1col_190 string, +col_1col_1col_1col_1col_1col_191 string, +col_1col_1col_1col_1col_1col_192 string, +col_1col_1col_1col_1col_1col_193 string, +col_1col_1col_1col_1col_1col_194 string, +col_1col_1col_1col_1col_1col_195 string, +col_1col_1col_1col_1col_1col_196 string, +col_1col_1col_1col_1col_1col_197 string, +col_1col_1col_1col_1col_1col_198 string, +col_1col_1col_1col_1col_1col_199 string, +col_1col_1col_1col_1col_1col_1100 string, +col_1col_1col_1col_1col_1col_1101 string, +col_1col_1col_1col_1col_1col_1102 string, +col_1col_1col_1col_1col_1col_1103 string, +col_1col_1col_1col_1col_1col_1104 string, +col_1col_1col_1col_1col_1col_1105 string, +col_1col_1col_1col_1col_1col_1106 string, +col_1col_1col_1col_1col_1col_1107 string, +col_1col_1col_1col_1col_1col_1108 string, +col_1col_1col_1col_1col_1col_1109 string, +col_1col_1col_1col_1col_1col_1110 string, +col_1col_1col_1col_1col_1col_1111 string, +col_1col_1col_1col_1col_1col_1112 string, +col_1col_1col_1col_1col_1col_1113 string, +col_1col_1col_1col_1col_1col_1114 string, +col_1col_1col_1col_1col_1col_1115 string, +col_1col_1col_1col_1col_1col_1116 string, +col_1col_1col_1col_1col_1col_1117 string, +col_1col_1col_1col_1col_1col_1118 string, +col_1col_1col_1col_1col_1col_1119 string, +col_1col_1col_1col_1col_1col_1120 string, +col_1col_1col_1col_1col_1col_1121 string, +col_1col_1col_1col_1col_1col_1122 string, +col_1col_1col_1col_1col_1col_1123 string, +col_1col_1col_1col_1col_1col_1124 string, +col_1col_1col_1col_1col_1col_1125 string, +col_1col_1col_1col_1col_1col_1126 string, +col_1col_1col_1col_1col_1col_1127 string, +col_1col_1col_1col_1col_1col_1128 string, +col_1col_1col_1col_1col_1col_1129 string, +col_1col_1col_1col_1col_1col_1130 string, +col_1col_1col_1col_1col_1col_1131 string, +col_1col_1col_1col_1col_1col_1132 string, +col_1col_1col_1col_1col_1col_1133 string, +col_1col_1col_1col_1col_1col_1134 string, +col_1col_1col_1col_1col_1col_1135 string, +col_1col_1col_1col_1col_1col_1136 string, +col_1col_1col_1col_1col_1col_1137 string, +col_1col_1col_1col_1col_1col_1138 string, +col_1col_1col_1col_1col_1col_1139 string, +col_1col_1col_1col_1col_1col_1140 string, +col_1col_1col_1col_1col_1col_1141 string, +col_1col_1col_1col_1col_1col_1142 string, +col_1col_1col_1col_1col_1col_1143 string, +col_1col_1col_1col_1col_1col_1144 string, +col_1col_1col_1col_1col_1col_1145 string, +col_1col_1col_1col_1col_1col_1146 string, +col_1col_1col_1col_1col_1col_1147 string, +col_1col_1col_1col_1col_1col_1148 string, +col_1col_1col_1col_1col_1col_1149 string, +col_1col_1col_1col_1col_1col_1150 string, +col_1col_1col_1col_1col_1col_1151 string, +col_1col_1col_1col_1col_1col_1152 string, +col_1col_1col_1col_1col_1col_1153 string, +col_1col_1col_1col_1col_1col_1154 string, +col_1col_1col_1col_1col_1col_1155 string, +col_1col_1col_1col_1col_1col_1156 string, +col_1col_1col_1col_1col_1col_1157 string, +col_1col_1col_1col_1col_1col_1158 string) + PARTITIONED BY ( + `partition_col` string); + +alter table alterPartTbl add partition(partition_col='CCL'); + +drop table alterPartTbl; + + + diff --git a/ql/src/test/results/clientpositive/alter_partition_change_col.q.out b/ql/src/test/results/clientpositive/alter_partition_change_col.q.out index 7e2864b816..d330026392 100644 --- a/ql/src/test/results/clientpositive/alter_partition_change_col.q.out +++ b/ql/src/test/results/clientpositive/alter_partition_change_col.q.out @@ -766,3 +766,346 @@ Snow 56.0000 __HIVE_DEFAULT_PARTITION__ 123 Tom -12.0000 __HIVE_DEFAULT_PARTITION__ 123 Tom 19.0000 __HIVE_DEFAULT_PARTITION__ 123 Tom 235.0000 __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: CREATE TABLE `alterPartTbl`( +col_1col_1col_1col_1col_1col_11 string, +col_1col_1col_1col_1col_1col_12 string, +col_1col_1col_1col_1col_1col_13 string, +col_1col_1col_1col_1col_1col_14 string, +col_1col_1col_1col_1col_1col_15 string, +col_1col_1col_1col_1col_1col_16 string, +col_1col_1col_1col_1col_1col_17 string, +col_1col_1col_1col_1col_1col_18 string, +col_1col_1col_1col_1col_1col_19 string, +col_1col_1col_1col_1col_1col_110 string, +col_1col_1col_1col_1col_1col_111 string, +col_1col_1col_1col_1col_1col_112 string, +col_1col_1col_1col_1col_1col_113 string, +col_1col_1col_1col_1col_1col_114 string, +col_1col_1col_1col_1col_1col_115 string, +col_1col_1col_1col_1col_1col_116 string, +col_1col_1col_1col_1col_1col_117 string, +col_1col_1col_1col_1col_1col_118 string, +col_1col_1col_1col_1col_1col_119 string, +col_1col_1col_1col_1col_1col_120 string, +col_1col_1col_1col_1col_1col_121 string, +col_1col_1col_1col_1col_1col_122 string, +col_1col_1col_1col_1col_1col_123 string, +col_1col_1col_1col_1col_1col_124 string, +col_1col_1col_1col_1col_1col_125 string, +col_1col_1col_1col_1col_1col_126 string, +col_1col_1col_1col_1col_1col_127 string, +col_1col_1col_1col_1col_1col_128 string, +col_1col_1col_1col_1col_1col_129 string, +col_1col_1col_1col_1col_1col_130 string, +col_1col_1col_1col_1col_1col_131 string, +col_1col_1col_1col_1col_1col_132 string, +col_1col_1col_1col_1col_1col_133 string, +col_1col_1col_1col_1col_1col_134 string, +col_1col_1col_1col_1col_1col_135 string, +col_1col_1col_1col_1col_1col_136 string, +col_1col_1col_1col_1col_1col_137 string, +col_1col_1col_1col_1col_1col_138 string, +col_1col_1col_1col_1col_1col_139 string, +col_1col_1col_1col_1col_1col_140 string, +col_1col_1col_1col_1col_1col_141 string, +col_1col_1col_1col_1col_1col_142 string, +col_1col_1col_1col_1col_1col_143 string, +col_1col_1col_1col_1col_1col_144 string, +col_1col_1col_1col_1col_1col_145 string, +col_1col_1col_1col_1col_1col_146 string, +col_1col_1col_1col_1col_1col_147 string, +col_1col_1col_1col_1col_1col_148 string, +col_1col_1col_1col_1col_1col_149 string, +col_1col_1col_1col_1col_1col_150 string, +col_1col_1col_1col_1col_1col_151 string, +col_1col_1col_1col_1col_1col_152 string, +col_1col_1col_1col_1col_1col_153 string, +col_1col_1col_1col_1col_1col_154 string, +col_1col_1col_1col_1col_1col_155 string, +col_1col_1col_1col_1col_1col_156 string, +col_1col_1col_1col_1col_1col_157 string, +col_1col_1col_1col_1col_1col_158 string, +col_1col_1col_1col_1col_1col_159 string, +col_1col_1col_1col_1col_1col_160 string, +col_1col_1col_1col_1col_1col_161 string, +col_1col_1col_1col_1col_1col_162 string, +col_1col_1col_1col_1col_1col_163 string, +col_1col_1col_1col_1col_1col_164 string, +col_1col_1col_1col_1col_1col_165 string, +col_1col_1col_1col_1col_1col_166 string, +col_1col_1col_1col_1col_1col_167 string, +col_1col_1col_1col_1col_1col_168 string, +col_1col_1col_1col_1col_1col_169 string, +col_1col_1col_1col_1col_1col_170 string, +col_1col_1col_1col_1col_1col_171 string, +col_1col_1col_1col_1col_1col_172 string, +col_1col_1col_1col_1col_1col_173 string, +col_1col_1col_1col_1col_1col_174 string, +col_1col_1col_1col_1col_1col_175 string, +col_1col_1col_1col_1col_1col_176 string, +col_1col_1col_1col_1col_1col_177 string, +col_1col_1col_1col_1col_1col_178 string, +col_1col_1col_1col_1col_1col_179 string, +col_1col_1col_1col_1col_1col_180 string, +col_1col_1col_1col_1col_1col_181 string, +col_1col_1col_1col_1col_1col_182 string, +col_1col_1col_1col_1col_1col_183 string, +col_1col_1col_1col_1col_1col_184 string, +col_1col_1col_1col_1col_1col_185 string, +col_1col_1col_1col_1col_1col_186 string, +col_1col_1col_1col_1col_1col_187 string, +col_1col_1col_1col_1col_1col_188 string, +col_1col_1col_1col_1col_1col_189 string, +col_1col_1col_1col_1col_1col_190 string, +col_1col_1col_1col_1col_1col_191 string, +col_1col_1col_1col_1col_1col_192 string, +col_1col_1col_1col_1col_1col_193 string, +col_1col_1col_1col_1col_1col_194 string, +col_1col_1col_1col_1col_1col_195 string, +col_1col_1col_1col_1col_1col_196 string, +col_1col_1col_1col_1col_1col_197 string, +col_1col_1col_1col_1col_1col_198 string, +col_1col_1col_1col_1col_1col_199 string, +col_1col_1col_1col_1col_1col_1100 string, +col_1col_1col_1col_1col_1col_1101 string, +col_1col_1col_1col_1col_1col_1102 string, +col_1col_1col_1col_1col_1col_1103 string, +col_1col_1col_1col_1col_1col_1104 string, +col_1col_1col_1col_1col_1col_1105 string, +col_1col_1col_1col_1col_1col_1106 string, +col_1col_1col_1col_1col_1col_1107 string, +col_1col_1col_1col_1col_1col_1108 string, +col_1col_1col_1col_1col_1col_1109 string, +col_1col_1col_1col_1col_1col_1110 string, +col_1col_1col_1col_1col_1col_1111 string, +col_1col_1col_1col_1col_1col_1112 string, +col_1col_1col_1col_1col_1col_1113 string, +col_1col_1col_1col_1col_1col_1114 string, +col_1col_1col_1col_1col_1col_1115 string, +col_1col_1col_1col_1col_1col_1116 string, +col_1col_1col_1col_1col_1col_1117 string, +col_1col_1col_1col_1col_1col_1118 string, +col_1col_1col_1col_1col_1col_1119 string, +col_1col_1col_1col_1col_1col_1120 string, +col_1col_1col_1col_1col_1col_1121 string, +col_1col_1col_1col_1col_1col_1122 string, +col_1col_1col_1col_1col_1col_1123 string, +col_1col_1col_1col_1col_1col_1124 string, +col_1col_1col_1col_1col_1col_1125 string, +col_1col_1col_1col_1col_1col_1126 string, +col_1col_1col_1col_1col_1col_1127 string, +col_1col_1col_1col_1col_1col_1128 string, +col_1col_1col_1col_1col_1col_1129 string, +col_1col_1col_1col_1col_1col_1130 string, +col_1col_1col_1col_1col_1col_1131 string, +col_1col_1col_1col_1col_1col_1132 string, +col_1col_1col_1col_1col_1col_1133 string, +col_1col_1col_1col_1col_1col_1134 string, +col_1col_1col_1col_1col_1col_1135 string, +col_1col_1col_1col_1col_1col_1136 string, +col_1col_1col_1col_1col_1col_1137 string, +col_1col_1col_1col_1col_1col_1138 string, +col_1col_1col_1col_1col_1col_1139 string, +col_1col_1col_1col_1col_1col_1140 string, +col_1col_1col_1col_1col_1col_1141 string, +col_1col_1col_1col_1col_1col_1142 string, +col_1col_1col_1col_1col_1col_1143 string, +col_1col_1col_1col_1col_1col_1144 string, +col_1col_1col_1col_1col_1col_1145 string, +col_1col_1col_1col_1col_1col_1146 string, +col_1col_1col_1col_1col_1col_1147 string, +col_1col_1col_1col_1col_1col_1148 string, +col_1col_1col_1col_1col_1col_1149 string, +col_1col_1col_1col_1col_1col_1150 string, +col_1col_1col_1col_1col_1col_1151 string, +col_1col_1col_1col_1col_1col_1152 string, +col_1col_1col_1col_1col_1col_1153 string, +col_1col_1col_1col_1col_1col_1154 string, +col_1col_1col_1col_1col_1col_1155 string, +col_1col_1col_1col_1col_1col_1156 string, +col_1col_1col_1col_1col_1col_1157 string, +col_1col_1col_1col_1col_1col_1158 string) + PARTITIONED BY ( + `partition_col` string) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@alterPartTbl +POSTHOOK: query: CREATE TABLE `alterPartTbl`( +col_1col_1col_1col_1col_1col_11 string, +col_1col_1col_1col_1col_1col_12 string, +col_1col_1col_1col_1col_1col_13 string, +col_1col_1col_1col_1col_1col_14 string, +col_1col_1col_1col_1col_1col_15 string, +col_1col_1col_1col_1col_1col_16 string, +col_1col_1col_1col_1col_1col_17 string, +col_1col_1col_1col_1col_1col_18 string, +col_1col_1col_1col_1col_1col_19 string, +col_1col_1col_1col_1col_1col_110 string, +col_1col_1col_1col_1col_1col_111 string, +col_1col_1col_1col_1col_1col_112 string, +col_1col_1col_1col_1col_1col_113 string, +col_1col_1col_1col_1col_1col_114 string, +col_1col_1col_1col_1col_1col_115 string, +col_1col_1col_1col_1col_1col_116 string, +col_1col_1col_1col_1col_1col_117 string, +col_1col_1col_1col_1col_1col_118 string, +col_1col_1col_1col_1col_1col_119 string, +col_1col_1col_1col_1col_1col_120 string, +col_1col_1col_1col_1col_1col_121 string, +col_1col_1col_1col_1col_1col_122 string, +col_1col_1col_1col_1col_1col_123 string, +col_1col_1col_1col_1col_1col_124 string, +col_1col_1col_1col_1col_1col_125 string, +col_1col_1col_1col_1col_1col_126 string, +col_1col_1col_1col_1col_1col_127 string, +col_1col_1col_1col_1col_1col_128 string, +col_1col_1col_1col_1col_1col_129 string, +col_1col_1col_1col_1col_1col_130 string, +col_1col_1col_1col_1col_1col_131 string, +col_1col_1col_1col_1col_1col_132 string, +col_1col_1col_1col_1col_1col_133 string, +col_1col_1col_1col_1col_1col_134 string, +col_1col_1col_1col_1col_1col_135 string, +col_1col_1col_1col_1col_1col_136 string, +col_1col_1col_1col_1col_1col_137 string, +col_1col_1col_1col_1col_1col_138 string, +col_1col_1col_1col_1col_1col_139 string, +col_1col_1col_1col_1col_1col_140 string, +col_1col_1col_1col_1col_1col_141 string, +col_1col_1col_1col_1col_1col_142 string, +col_1col_1col_1col_1col_1col_143 string, +col_1col_1col_1col_1col_1col_144 string, +col_1col_1col_1col_1col_1col_145 string, +col_1col_1col_1col_1col_1col_146 string, +col_1col_1col_1col_1col_1col_147 string, +col_1col_1col_1col_1col_1col_148 string, +col_1col_1col_1col_1col_1col_149 string, +col_1col_1col_1col_1col_1col_150 string, +col_1col_1col_1col_1col_1col_151 string, +col_1col_1col_1col_1col_1col_152 string, +col_1col_1col_1col_1col_1col_153 string, +col_1col_1col_1col_1col_1col_154 string, +col_1col_1col_1col_1col_1col_155 string, +col_1col_1col_1col_1col_1col_156 string, +col_1col_1col_1col_1col_1col_157 string, +col_1col_1col_1col_1col_1col_158 string, +col_1col_1col_1col_1col_1col_159 string, +col_1col_1col_1col_1col_1col_160 string, +col_1col_1col_1col_1col_1col_161 string, +col_1col_1col_1col_1col_1col_162 string, +col_1col_1col_1col_1col_1col_163 string, +col_1col_1col_1col_1col_1col_164 string, +col_1col_1col_1col_1col_1col_165 string, +col_1col_1col_1col_1col_1col_166 string, +col_1col_1col_1col_1col_1col_167 string, +col_1col_1col_1col_1col_1col_168 string, +col_1col_1col_1col_1col_1col_169 string, +col_1col_1col_1col_1col_1col_170 string, +col_1col_1col_1col_1col_1col_171 string, +col_1col_1col_1col_1col_1col_172 string, +col_1col_1col_1col_1col_1col_173 string, +col_1col_1col_1col_1col_1col_174 string, +col_1col_1col_1col_1col_1col_175 string, +col_1col_1col_1col_1col_1col_176 string, +col_1col_1col_1col_1col_1col_177 string, +col_1col_1col_1col_1col_1col_178 string, +col_1col_1col_1col_1col_1col_179 string, +col_1col_1col_1col_1col_1col_180 string, +col_1col_1col_1col_1col_1col_181 string, +col_1col_1col_1col_1col_1col_182 string, +col_1col_1col_1col_1col_1col_183 string, +col_1col_1col_1col_1col_1col_184 string, +col_1col_1col_1col_1col_1col_185 string, +col_1col_1col_1col_1col_1col_186 string, +col_1col_1col_1col_1col_1col_187 string, +col_1col_1col_1col_1col_1col_188 string, +col_1col_1col_1col_1col_1col_189 string, +col_1col_1col_1col_1col_1col_190 string, +col_1col_1col_1col_1col_1col_191 string, +col_1col_1col_1col_1col_1col_192 string, +col_1col_1col_1col_1col_1col_193 string, +col_1col_1col_1col_1col_1col_194 string, +col_1col_1col_1col_1col_1col_195 string, +col_1col_1col_1col_1col_1col_196 string, +col_1col_1col_1col_1col_1col_197 string, +col_1col_1col_1col_1col_1col_198 string, +col_1col_1col_1col_1col_1col_199 string, +col_1col_1col_1col_1col_1col_1100 string, +col_1col_1col_1col_1col_1col_1101 string, +col_1col_1col_1col_1col_1col_1102 string, +col_1col_1col_1col_1col_1col_1103 string, +col_1col_1col_1col_1col_1col_1104 string, +col_1col_1col_1col_1col_1col_1105 string, +col_1col_1col_1col_1col_1col_1106 string, +col_1col_1col_1col_1col_1col_1107 string, +col_1col_1col_1col_1col_1col_1108 string, +col_1col_1col_1col_1col_1col_1109 string, +col_1col_1col_1col_1col_1col_1110 string, +col_1col_1col_1col_1col_1col_1111 string, +col_1col_1col_1col_1col_1col_1112 string, +col_1col_1col_1col_1col_1col_1113 string, +col_1col_1col_1col_1col_1col_1114 string, +col_1col_1col_1col_1col_1col_1115 string, +col_1col_1col_1col_1col_1col_1116 string, +col_1col_1col_1col_1col_1col_1117 string, +col_1col_1col_1col_1col_1col_1118 string, +col_1col_1col_1col_1col_1col_1119 string, +col_1col_1col_1col_1col_1col_1120 string, +col_1col_1col_1col_1col_1col_1121 string, +col_1col_1col_1col_1col_1col_1122 string, +col_1col_1col_1col_1col_1col_1123 string, +col_1col_1col_1col_1col_1col_1124 string, +col_1col_1col_1col_1col_1col_1125 string, +col_1col_1col_1col_1col_1col_1126 string, +col_1col_1col_1col_1col_1col_1127 string, +col_1col_1col_1col_1col_1col_1128 string, +col_1col_1col_1col_1col_1col_1129 string, +col_1col_1col_1col_1col_1col_1130 string, +col_1col_1col_1col_1col_1col_1131 string, +col_1col_1col_1col_1col_1col_1132 string, +col_1col_1col_1col_1col_1col_1133 string, +col_1col_1col_1col_1col_1col_1134 string, +col_1col_1col_1col_1col_1col_1135 string, +col_1col_1col_1col_1col_1col_1136 string, +col_1col_1col_1col_1col_1col_1137 string, +col_1col_1col_1col_1col_1col_1138 string, +col_1col_1col_1col_1col_1col_1139 string, +col_1col_1col_1col_1col_1col_1140 string, +col_1col_1col_1col_1col_1col_1141 string, +col_1col_1col_1col_1col_1col_1142 string, +col_1col_1col_1col_1col_1col_1143 string, +col_1col_1col_1col_1col_1col_1144 string, +col_1col_1col_1col_1col_1col_1145 string, +col_1col_1col_1col_1col_1col_1146 string, +col_1col_1col_1col_1col_1col_1147 string, +col_1col_1col_1col_1col_1col_1148 string, +col_1col_1col_1col_1col_1col_1149 string, +col_1col_1col_1col_1col_1col_1150 string, +col_1col_1col_1col_1col_1col_1151 string, +col_1col_1col_1col_1col_1col_1152 string, +col_1col_1col_1col_1col_1col_1153 string, +col_1col_1col_1col_1col_1col_1154 string, +col_1col_1col_1col_1col_1col_1155 string, +col_1col_1col_1col_1col_1col_1156 string, +col_1col_1col_1col_1col_1col_1157 string, +col_1col_1col_1col_1col_1col_1158 string) + PARTITIONED BY ( + `partition_col` string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@alterPartTbl +PREHOOK: query: alter table alterPartTbl add partition(partition_col='CCL') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Output: default@alterparttbl +POSTHOOK: query: alter table alterPartTbl add partition(partition_col='CCL') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Output: default@alterparttbl +POSTHOOK: Output: default@alterparttbl@partition_col=CCL +PREHOOK: query: drop table alterPartTbl +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@alterparttbl +PREHOOK: Output: default@alterparttbl +POSTHOOK: query: drop table alterPartTbl +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@alterparttbl +POSTHOOK: Output: default@alterparttbl diff --git a/ql/src/test/results/clientpositive/llap/alter_partition_change_col.q.out b/ql/src/test/results/clientpositive/llap/alter_partition_change_col.q.out new file mode 100644 index 0000000000..d330026392 --- /dev/null +++ b/ql/src/test/results/clientpositive/llap/alter_partition_change_col.q.out @@ -0,0 +1,1111 @@ +PREHOOK: query: create table alter_partition_change_col0 (c1 string, c2 string) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@alter_partition_change_col0 +POSTHOOK: query: create table alter_partition_change_col0 (c1 string, c2 string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@alter_partition_change_col0 +PREHOOK: query: load data local inpath '../../data/files/dec.txt' overwrite into table alter_partition_change_col0 +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@alter_partition_change_col0 +POSTHOOK: query: load data local inpath '../../data/files/dec.txt' overwrite into table alter_partition_change_col0 +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@alter_partition_change_col0 +PREHOOK: query: create table alter_partition_change_col1 (c1 string, c2 string) partitioned by (p1 string comment 'Column p1', p2 string comment 'Column p2') +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@alter_partition_change_col1 +POSTHOOK: query: create table alter_partition_change_col1 (c1 string, c2 string) partitioned by (p1 string comment 'Column p1', p2 string comment 'Column p2') +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@alter_partition_change_col1 +PREHOOK: query: insert overwrite table alter_partition_change_col1 partition (p1, p2) + select c1, c2, 'abc', '123' from alter_partition_change_col0 + union all + select c1, c2, cast(null as string), '123' from alter_partition_change_col0 +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col0 +PREHOOK: Output: default@alter_partition_change_col1 +POSTHOOK: query: insert overwrite table alter_partition_change_col1 partition (p1, p2) + select c1, c2, 'abc', '123' from alter_partition_change_col0 + union all + select c1, c2, cast(null as string), '123' from alter_partition_change_col0 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col0 +POSTHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123 +POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=__HIVE_DEFAULT_PARTITION__,p2=123).c1 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c1, type:string, comment:null), ] +POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=__HIVE_DEFAULT_PARTITION__,p2=123).c2 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c2, type:string, comment:null), ] +POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=abc,p2=123).c1 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c1, type:string, comment:null), ] +POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=abc,p2=123).c2 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c2, type:string, comment:null), ] +PREHOOK: query: show partitions alter_partition_change_col1 +PREHOOK: type: SHOWPARTITIONS +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: show partitions alter_partition_change_col1 +POSTHOOK: type: SHOWPARTITIONS +POSTHOOK: Input: default@alter_partition_change_col1 +p1=__HIVE_DEFAULT_PARTITION__/p2=123 +p1=abc/p2=123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='abc' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +Beck 0.0 abc 123 +Beck 77.341 abc 123 +Beck 79.9 abc 123 +Cluck 5.96 abc 123 +Mary 33.33 abc 123 +Mary 4.329 abc 123 +Snow 55.71 abc 123 +Tom -12.25 abc 123 +Tom 19.00 abc 123 +Tom 234.79 abc 123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +Beck 0.0 __HIVE_DEFAULT_PARTITION__ 123 +Beck 77.341 __HIVE_DEFAULT_PARTITION__ 123 +Beck 79.9 __HIVE_DEFAULT_PARTITION__ 123 +Cluck 5.96 __HIVE_DEFAULT_PARTITION__ 123 +Mary 33.33 __HIVE_DEFAULT_PARTITION__ 123 +Mary 4.329 __HIVE_DEFAULT_PARTITION__ 123 +Snow 55.71 __HIVE_DEFAULT_PARTITION__ 123 +Tom -12.25 __HIVE_DEFAULT_PARTITION__ 123 +Tom 19.00 __HIVE_DEFAULT_PARTITION__ 123 +Tom 234.79 __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' or lower(p1)='a' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' or lower(p1)='a' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +Beck 0.0 __HIVE_DEFAULT_PARTITION__ 123 +Beck 77.341 __HIVE_DEFAULT_PARTITION__ 123 +Beck 79.9 __HIVE_DEFAULT_PARTITION__ 123 +Cluck 5.96 __HIVE_DEFAULT_PARTITION__ 123 +Mary 33.33 __HIVE_DEFAULT_PARTITION__ 123 +Mary 4.329 __HIVE_DEFAULT_PARTITION__ 123 +Snow 55.71 __HIVE_DEFAULT_PARTITION__ 123 +Tom -12.25 __HIVE_DEFAULT_PARTITION__ 123 +Tom 19.00 __HIVE_DEFAULT_PARTITION__ 123 +Tom 234.79 __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: alter table alter_partition_change_col1 change c2 c2 decimal(10,0) +PREHOOK: type: ALTERTABLE_RENAMECOL +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Output: default@alter_partition_change_col1 +POSTHOOK: query: alter table alter_partition_change_col1 change c2 c2 decimal(10,0) +POSTHOOK: type: ALTERTABLE_RENAMECOL +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Output: default@alter_partition_change_col1 +PREHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') change c2 c2 decimal(10,0) +PREHOOK: type: ALTERTABLE_RENAMECOL +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123 +POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') change c2 c2 decimal(10,0) +POSTHOOK: type: ALTERTABLE_RENAMECOL +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123 +PREHOOK: query: alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') change c2 c2 decimal(10,0) +PREHOOK: type: ALTERTABLE_RENAMECOL +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') change c2 c2 decimal(10,0) +POSTHOOK: type: ALTERTABLE_RENAMECOL +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +POSTHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='abc' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +Beck 0 abc 123 +Beck 77 abc 123 +Beck 80 abc 123 +Cluck 6 abc 123 +Mary 33 abc 123 +Mary 4 abc 123 +Snow 56 abc 123 +Tom -12 abc 123 +Tom 19 abc 123 +Tom 235 abc 123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +Beck 0 __HIVE_DEFAULT_PARTITION__ 123 +Beck 77 __HIVE_DEFAULT_PARTITION__ 123 +Beck 80 __HIVE_DEFAULT_PARTITION__ 123 +Cluck 6 __HIVE_DEFAULT_PARTITION__ 123 +Mary 33 __HIVE_DEFAULT_PARTITION__ 123 +Mary 4 __HIVE_DEFAULT_PARTITION__ 123 +Snow 56 __HIVE_DEFAULT_PARTITION__ 123 +Tom -12 __HIVE_DEFAULT_PARTITION__ 123 +Tom 19 __HIVE_DEFAULT_PARTITION__ 123 +Tom 235 __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: alter table alter_partition_change_col1 change c2 c2 decimal(14,4) +PREHOOK: type: ALTERTABLE_RENAMECOL +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Output: default@alter_partition_change_col1 +POSTHOOK: query: alter table alter_partition_change_col1 change c2 c2 decimal(14,4) +POSTHOOK: type: ALTERTABLE_RENAMECOL +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Output: default@alter_partition_change_col1 +PREHOOK: query: describe alter_partition_change_col1 +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +c2 decimal(14,4) +p1 string Column p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Column p1 +p2 string Column p2 +PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +c2 decimal(10,0) +p1 string Column p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Column p1 +p2 string Column p2 +PREHOOK: query: select * from alter_partition_change_col1 where p1='abc' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +Beck 0.0000 abc 123 +Beck 77.0000 abc 123 +Beck 80.0000 abc 123 +Cluck 6.0000 abc 123 +Mary 33.0000 abc 123 +Mary 4.0000 abc 123 +Snow 56.0000 abc 123 +Tom -12.0000 abc 123 +Tom 19.0000 abc 123 +Tom 235.0000 abc 123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +Beck 0.0000 __HIVE_DEFAULT_PARTITION__ 123 +Beck 77.0000 __HIVE_DEFAULT_PARTITION__ 123 +Beck 80.0000 __HIVE_DEFAULT_PARTITION__ 123 +Cluck 6.0000 __HIVE_DEFAULT_PARTITION__ 123 +Mary 33.0000 __HIVE_DEFAULT_PARTITION__ 123 +Mary 4.0000 __HIVE_DEFAULT_PARTITION__ 123 +Snow 56.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom -12.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom 19.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom 235.0000 __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: alter table alter_partition_change_col1 partition column (p1 string comment 'Changed comment for p1') +PREHOOK: type: ALTERTABLE_PARTCOLTYPE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: alter table alter_partition_change_col1 partition column (p1 string comment 'Changed comment for p1') +POSTHOOK: type: ALTERTABLE_PARTCOLTYPE +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Output: default@alter_partition_change_col1 +PREHOOK: query: describe alter_partition_change_col1 +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +c2 decimal(14,4) +p1 string Changed comment for p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Changed comment for p1 +p2 string Column p2 +PREHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') change c2 c2 decimal(14,4) +PREHOOK: type: ALTERTABLE_RENAMECOL +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123 +POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') change c2 c2 decimal(14,4) +POSTHOOK: type: ALTERTABLE_RENAMECOL +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123 +PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +c2 decimal(14,4) +p1 string Changed comment for p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Changed comment for p1 +p2 string Column p2 +PREHOOK: query: select * from alter_partition_change_col1 where p1='abc' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +Beck 0.0000 abc 123 +Beck 77.3410 abc 123 +Beck 79.9000 abc 123 +Cluck 5.9600 abc 123 +Mary 33.3300 abc 123 +Mary 4.3290 abc 123 +Snow 55.7100 abc 123 +Tom -12.2500 abc 123 +Tom 19.0000 abc 123 +Tom 234.7900 abc 123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +Beck 0.0000 __HIVE_DEFAULT_PARTITION__ 123 +Beck 77.0000 __HIVE_DEFAULT_PARTITION__ 123 +Beck 80.0000 __HIVE_DEFAULT_PARTITION__ 123 +Cluck 6.0000 __HIVE_DEFAULT_PARTITION__ 123 +Mary 33.0000 __HIVE_DEFAULT_PARTITION__ 123 +Mary 4.0000 __HIVE_DEFAULT_PARTITION__ 123 +Snow 56.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom -12.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom 19.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom 235.0000 __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') change c2 c2 decimal(14,4) +PREHOOK: type: ALTERTABLE_RENAMECOL +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') change c2 c2 decimal(14,4) +POSTHOOK: type: ALTERTABLE_RENAMECOL +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +POSTHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +PREHOOK: query: describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +c2 decimal(14,4) +p1 string Changed comment for p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Changed comment for p1 +p2 string Column p2 +PREHOOK: query: select * from alter_partition_change_col1 where p1='abc' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +Beck 0.0000 abc 123 +Beck 77.3410 abc 123 +Beck 79.9000 abc 123 +Cluck 5.9600 abc 123 +Mary 33.3300 abc 123 +Mary 4.3290 abc 123 +Snow 55.7100 abc 123 +Tom -12.2500 abc 123 +Tom 19.0000 abc 123 +Tom 234.7900 abc 123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +Beck 0.0000 __HIVE_DEFAULT_PARTITION__ 123 +Beck 77.3410 __HIVE_DEFAULT_PARTITION__ 123 +Beck 79.9000 __HIVE_DEFAULT_PARTITION__ 123 +Cluck 5.9600 __HIVE_DEFAULT_PARTITION__ 123 +Mary 33.3300 __HIVE_DEFAULT_PARTITION__ 123 +Mary 4.3290 __HIVE_DEFAULT_PARTITION__ 123 +Snow 55.7100 __HIVE_DEFAULT_PARTITION__ 123 +Tom -12.2500 __HIVE_DEFAULT_PARTITION__ 123 +Tom 19.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom 234.7900 __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') replace columns (c1 string) +PREHOOK: type: ALTERTABLE_REPLACECOLS +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123 +POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') replace columns (c1 string) +POSTHOOK: type: ALTERTABLE_REPLACECOLS +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123 +PREHOOK: query: describe alter_partition_change_col1 +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +c2 decimal(14,4) +p1 string Changed comment for p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Changed comment for p1 +p2 string Column p2 +PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +p1 string Changed comment for p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Changed comment for p1 +p2 string Column p2 +PREHOOK: query: select * from alter_partition_change_col1 where p1='abc' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +Beck NULL abc 123 +Beck NULL abc 123 +Beck NULL abc 123 +Cluck NULL abc 123 +Mary NULL abc 123 +Mary NULL abc 123 +Snow NULL abc 123 +Tom NULL abc 123 +Tom NULL abc 123 +Tom NULL abc 123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +Beck 0.0000 __HIVE_DEFAULT_PARTITION__ 123 +Beck 77.3410 __HIVE_DEFAULT_PARTITION__ 123 +Beck 79.9000 __HIVE_DEFAULT_PARTITION__ 123 +Cluck 5.9600 __HIVE_DEFAULT_PARTITION__ 123 +Mary 33.3300 __HIVE_DEFAULT_PARTITION__ 123 +Mary 4.3290 __HIVE_DEFAULT_PARTITION__ 123 +Snow 55.7100 __HIVE_DEFAULT_PARTITION__ 123 +Tom -12.2500 __HIVE_DEFAULT_PARTITION__ 123 +Tom 19.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom 234.7900 __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: alter table alter_partition_change_col1 replace columns (c1 string) +PREHOOK: type: ALTERTABLE_REPLACECOLS +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Output: default@alter_partition_change_col1 +POSTHOOK: query: alter table alter_partition_change_col1 replace columns (c1 string) +POSTHOOK: type: ALTERTABLE_REPLACECOLS +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Output: default@alter_partition_change_col1 +PREHOOK: query: describe alter_partition_change_col1 +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +p1 string Changed comment for p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Changed comment for p1 +p2 string Column p2 +PREHOOK: query: select * from alter_partition_change_col1 where p1='abc' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +Beck abc 123 +Beck abc 123 +Beck abc 123 +Cluck abc 123 +Mary abc 123 +Mary abc 123 +Snow abc 123 +Tom abc 123 +Tom abc 123 +Tom abc 123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +Beck __HIVE_DEFAULT_PARTITION__ 123 +Beck __HIVE_DEFAULT_PARTITION__ 123 +Beck __HIVE_DEFAULT_PARTITION__ 123 +Cluck __HIVE_DEFAULT_PARTITION__ 123 +Mary __HIVE_DEFAULT_PARTITION__ 123 +Mary __HIVE_DEFAULT_PARTITION__ 123 +Snow __HIVE_DEFAULT_PARTITION__ 123 +Tom __HIVE_DEFAULT_PARTITION__ 123 +Tom __HIVE_DEFAULT_PARTITION__ 123 +Tom __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: alter table alter_partition_change_col1 add columns (c2 decimal(14,4)) +PREHOOK: type: ALTERTABLE_ADDCOLS +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Output: default@alter_partition_change_col1 +POSTHOOK: query: alter table alter_partition_change_col1 add columns (c2 decimal(14,4)) +POSTHOOK: type: ALTERTABLE_ADDCOLS +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Output: default@alter_partition_change_col1 +PREHOOK: query: describe alter_partition_change_col1 +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +c2 decimal(14,4) +p1 string Changed comment for p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Changed comment for p1 +p2 string Column p2 +PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +p1 string Changed comment for p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Changed comment for p1 +p2 string Column p2 +PREHOOK: query: select * from alter_partition_change_col1 where p1='abc' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +Beck NULL abc 123 +Beck NULL abc 123 +Beck NULL abc 123 +Cluck NULL abc 123 +Mary NULL abc 123 +Mary NULL abc 123 +Snow NULL abc 123 +Tom NULL abc 123 +Tom NULL abc 123 +Tom NULL abc 123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +Beck 0.0000 __HIVE_DEFAULT_PARTITION__ 123 +Beck 77.3410 __HIVE_DEFAULT_PARTITION__ 123 +Beck 79.9000 __HIVE_DEFAULT_PARTITION__ 123 +Cluck 5.9600 __HIVE_DEFAULT_PARTITION__ 123 +Mary 33.3300 __HIVE_DEFAULT_PARTITION__ 123 +Mary 4.3290 __HIVE_DEFAULT_PARTITION__ 123 +Snow 55.7100 __HIVE_DEFAULT_PARTITION__ 123 +Tom -12.2500 __HIVE_DEFAULT_PARTITION__ 123 +Tom 19.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom 234.7900 __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') add columns (c2 decimal(14,4)) +PREHOOK: type: ALTERTABLE_ADDCOLS +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123 +POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') add columns (c2 decimal(14,4)) +POSTHOOK: type: ALTERTABLE_ADDCOLS +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123 +PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +c2 decimal(14,4) +p1 string Changed comment for p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Changed comment for p1 +p2 string Column p2 +PREHOOK: query: select * from alter_partition_change_col1 where p1='abc' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +Beck 0.0000 abc 123 +Beck 77.3410 abc 123 +Beck 79.9000 abc 123 +Cluck 5.9600 abc 123 +Mary 33.3300 abc 123 +Mary 4.3290 abc 123 +Snow 55.7100 abc 123 +Tom -12.2500 abc 123 +Tom 19.0000 abc 123 +Tom 234.7900 abc 123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +Beck 0.0000 __HIVE_DEFAULT_PARTITION__ 123 +Beck 77.3410 __HIVE_DEFAULT_PARTITION__ 123 +Beck 79.9000 __HIVE_DEFAULT_PARTITION__ 123 +Cluck 5.9600 __HIVE_DEFAULT_PARTITION__ 123 +Mary 33.3300 __HIVE_DEFAULT_PARTITION__ 123 +Mary 4.3290 __HIVE_DEFAULT_PARTITION__ 123 +Snow 55.7100 __HIVE_DEFAULT_PARTITION__ 123 +Tom -12.2500 __HIVE_DEFAULT_PARTITION__ 123 +Tom 19.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom 234.7900 __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: alter table alter_partition_change_col1 partition (p1, p2='123') change column c2 c2 decimal(10,0) +PREHOOK: type: ALTERTABLE_RENAMECOL +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +PREHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123 +POSTHOOK: query: alter table alter_partition_change_col1 partition (p1, p2='123') change column c2 c2 decimal(10,0) +POSTHOOK: type: ALTERTABLE_RENAMECOL +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +POSTHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123 +PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123') +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +c2 decimal(10,0) +p1 string Changed comment for p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Changed comment for p1 +p2 string Column p2 +PREHOOK: query: describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: query: describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@alter_partition_change_col1 +c1 string +c2 decimal(10,0) +p1 string Changed comment for p1 +p2 string Column p2 + +# Partition Information +# col_name data_type comment +p1 string Changed comment for p1 +p2 string Column p2 +PREHOOK: query: select * from alter_partition_change_col1 where p1='abc' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123 +#### A masked pattern was here #### +Beck 0.0000 abc 123 +Beck 77.0000 abc 123 +Beck 80.0000 abc 123 +Cluck 6.0000 abc 123 +Mary 33.0000 abc 123 +Mary 4.0000 abc 123 +Snow 56.0000 abc 123 +Tom -12.0000 abc 123 +Tom 19.0000 abc 123 +Tom 235.0000 abc 123 +PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +PREHOOK: type: QUERY +PREHOOK: Input: default@alter_partition_change_col1 +PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alter_partition_change_col1 +POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123 +#### A masked pattern was here #### +Beck 0.0000 __HIVE_DEFAULT_PARTITION__ 123 +Beck 77.0000 __HIVE_DEFAULT_PARTITION__ 123 +Beck 80.0000 __HIVE_DEFAULT_PARTITION__ 123 +Cluck 6.0000 __HIVE_DEFAULT_PARTITION__ 123 +Mary 33.0000 __HIVE_DEFAULT_PARTITION__ 123 +Mary 4.0000 __HIVE_DEFAULT_PARTITION__ 123 +Snow 56.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom -12.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom 19.0000 __HIVE_DEFAULT_PARTITION__ 123 +Tom 235.0000 __HIVE_DEFAULT_PARTITION__ 123 +PREHOOK: query: CREATE TABLE `alterPartTbl`( +col_1col_1col_1col_1col_1col_11 string, +col_1col_1col_1col_1col_1col_12 string, +col_1col_1col_1col_1col_1col_13 string, +col_1col_1col_1col_1col_1col_14 string, +col_1col_1col_1col_1col_1col_15 string, +col_1col_1col_1col_1col_1col_16 string, +col_1col_1col_1col_1col_1col_17 string, +col_1col_1col_1col_1col_1col_18 string, +col_1col_1col_1col_1col_1col_19 string, +col_1col_1col_1col_1col_1col_110 string, +col_1col_1col_1col_1col_1col_111 string, +col_1col_1col_1col_1col_1col_112 string, +col_1col_1col_1col_1col_1col_113 string, +col_1col_1col_1col_1col_1col_114 string, +col_1col_1col_1col_1col_1col_115 string, +col_1col_1col_1col_1col_1col_116 string, +col_1col_1col_1col_1col_1col_117 string, +col_1col_1col_1col_1col_1col_118 string, +col_1col_1col_1col_1col_1col_119 string, +col_1col_1col_1col_1col_1col_120 string, +col_1col_1col_1col_1col_1col_121 string, +col_1col_1col_1col_1col_1col_122 string, +col_1col_1col_1col_1col_1col_123 string, +col_1col_1col_1col_1col_1col_124 string, +col_1col_1col_1col_1col_1col_125 string, +col_1col_1col_1col_1col_1col_126 string, +col_1col_1col_1col_1col_1col_127 string, +col_1col_1col_1col_1col_1col_128 string, +col_1col_1col_1col_1col_1col_129 string, +col_1col_1col_1col_1col_1col_130 string, +col_1col_1col_1col_1col_1col_131 string, +col_1col_1col_1col_1col_1col_132 string, +col_1col_1col_1col_1col_1col_133 string, +col_1col_1col_1col_1col_1col_134 string, +col_1col_1col_1col_1col_1col_135 string, +col_1col_1col_1col_1col_1col_136 string, +col_1col_1col_1col_1col_1col_137 string, +col_1col_1col_1col_1col_1col_138 string, +col_1col_1col_1col_1col_1col_139 string, +col_1col_1col_1col_1col_1col_140 string, +col_1col_1col_1col_1col_1col_141 string, +col_1col_1col_1col_1col_1col_142 string, +col_1col_1col_1col_1col_1col_143 string, +col_1col_1col_1col_1col_1col_144 string, +col_1col_1col_1col_1col_1col_145 string, +col_1col_1col_1col_1col_1col_146 string, +col_1col_1col_1col_1col_1col_147 string, +col_1col_1col_1col_1col_1col_148 string, +col_1col_1col_1col_1col_1col_149 string, +col_1col_1col_1col_1col_1col_150 string, +col_1col_1col_1col_1col_1col_151 string, +col_1col_1col_1col_1col_1col_152 string, +col_1col_1col_1col_1col_1col_153 string, +col_1col_1col_1col_1col_1col_154 string, +col_1col_1col_1col_1col_1col_155 string, +col_1col_1col_1col_1col_1col_156 string, +col_1col_1col_1col_1col_1col_157 string, +col_1col_1col_1col_1col_1col_158 string, +col_1col_1col_1col_1col_1col_159 string, +col_1col_1col_1col_1col_1col_160 string, +col_1col_1col_1col_1col_1col_161 string, +col_1col_1col_1col_1col_1col_162 string, +col_1col_1col_1col_1col_1col_163 string, +col_1col_1col_1col_1col_1col_164 string, +col_1col_1col_1col_1col_1col_165 string, +col_1col_1col_1col_1col_1col_166 string, +col_1col_1col_1col_1col_1col_167 string, +col_1col_1col_1col_1col_1col_168 string, +col_1col_1col_1col_1col_1col_169 string, +col_1col_1col_1col_1col_1col_170 string, +col_1col_1col_1col_1col_1col_171 string, +col_1col_1col_1col_1col_1col_172 string, +col_1col_1col_1col_1col_1col_173 string, +col_1col_1col_1col_1col_1col_174 string, +col_1col_1col_1col_1col_1col_175 string, +col_1col_1col_1col_1col_1col_176 string, +col_1col_1col_1col_1col_1col_177 string, +col_1col_1col_1col_1col_1col_178 string, +col_1col_1col_1col_1col_1col_179 string, +col_1col_1col_1col_1col_1col_180 string, +col_1col_1col_1col_1col_1col_181 string, +col_1col_1col_1col_1col_1col_182 string, +col_1col_1col_1col_1col_1col_183 string, +col_1col_1col_1col_1col_1col_184 string, +col_1col_1col_1col_1col_1col_185 string, +col_1col_1col_1col_1col_1col_186 string, +col_1col_1col_1col_1col_1col_187 string, +col_1col_1col_1col_1col_1col_188 string, +col_1col_1col_1col_1col_1col_189 string, +col_1col_1col_1col_1col_1col_190 string, +col_1col_1col_1col_1col_1col_191 string, +col_1col_1col_1col_1col_1col_192 string, +col_1col_1col_1col_1col_1col_193 string, +col_1col_1col_1col_1col_1col_194 string, +col_1col_1col_1col_1col_1col_195 string, +col_1col_1col_1col_1col_1col_196 string, +col_1col_1col_1col_1col_1col_197 string, +col_1col_1col_1col_1col_1col_198 string, +col_1col_1col_1col_1col_1col_199 string, +col_1col_1col_1col_1col_1col_1100 string, +col_1col_1col_1col_1col_1col_1101 string, +col_1col_1col_1col_1col_1col_1102 string, +col_1col_1col_1col_1col_1col_1103 string, +col_1col_1col_1col_1col_1col_1104 string, +col_1col_1col_1col_1col_1col_1105 string, +col_1col_1col_1col_1col_1col_1106 string, +col_1col_1col_1col_1col_1col_1107 string, +col_1col_1col_1col_1col_1col_1108 string, +col_1col_1col_1col_1col_1col_1109 string, +col_1col_1col_1col_1col_1col_1110 string, +col_1col_1col_1col_1col_1col_1111 string, +col_1col_1col_1col_1col_1col_1112 string, +col_1col_1col_1col_1col_1col_1113 string, +col_1col_1col_1col_1col_1col_1114 string, +col_1col_1col_1col_1col_1col_1115 string, +col_1col_1col_1col_1col_1col_1116 string, +col_1col_1col_1col_1col_1col_1117 string, +col_1col_1col_1col_1col_1col_1118 string, +col_1col_1col_1col_1col_1col_1119 string, +col_1col_1col_1col_1col_1col_1120 string, +col_1col_1col_1col_1col_1col_1121 string, +col_1col_1col_1col_1col_1col_1122 string, +col_1col_1col_1col_1col_1col_1123 string, +col_1col_1col_1col_1col_1col_1124 string, +col_1col_1col_1col_1col_1col_1125 string, +col_1col_1col_1col_1col_1col_1126 string, +col_1col_1col_1col_1col_1col_1127 string, +col_1col_1col_1col_1col_1col_1128 string, +col_1col_1col_1col_1col_1col_1129 string, +col_1col_1col_1col_1col_1col_1130 string, +col_1col_1col_1col_1col_1col_1131 string, +col_1col_1col_1col_1col_1col_1132 string, +col_1col_1col_1col_1col_1col_1133 string, +col_1col_1col_1col_1col_1col_1134 string, +col_1col_1col_1col_1col_1col_1135 string, +col_1col_1col_1col_1col_1col_1136 string, +col_1col_1col_1col_1col_1col_1137 string, +col_1col_1col_1col_1col_1col_1138 string, +col_1col_1col_1col_1col_1col_1139 string, +col_1col_1col_1col_1col_1col_1140 string, +col_1col_1col_1col_1col_1col_1141 string, +col_1col_1col_1col_1col_1col_1142 string, +col_1col_1col_1col_1col_1col_1143 string, +col_1col_1col_1col_1col_1col_1144 string, +col_1col_1col_1col_1col_1col_1145 string, +col_1col_1col_1col_1col_1col_1146 string, +col_1col_1col_1col_1col_1col_1147 string, +col_1col_1col_1col_1col_1col_1148 string, +col_1col_1col_1col_1col_1col_1149 string, +col_1col_1col_1col_1col_1col_1150 string, +col_1col_1col_1col_1col_1col_1151 string, +col_1col_1col_1col_1col_1col_1152 string, +col_1col_1col_1col_1col_1col_1153 string, +col_1col_1col_1col_1col_1col_1154 string, +col_1col_1col_1col_1col_1col_1155 string, +col_1col_1col_1col_1col_1col_1156 string, +col_1col_1col_1col_1col_1col_1157 string, +col_1col_1col_1col_1col_1col_1158 string) + PARTITIONED BY ( + `partition_col` string) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@alterPartTbl +POSTHOOK: query: CREATE TABLE `alterPartTbl`( +col_1col_1col_1col_1col_1col_11 string, +col_1col_1col_1col_1col_1col_12 string, +col_1col_1col_1col_1col_1col_13 string, +col_1col_1col_1col_1col_1col_14 string, +col_1col_1col_1col_1col_1col_15 string, +col_1col_1col_1col_1col_1col_16 string, +col_1col_1col_1col_1col_1col_17 string, +col_1col_1col_1col_1col_1col_18 string, +col_1col_1col_1col_1col_1col_19 string, +col_1col_1col_1col_1col_1col_110 string, +col_1col_1col_1col_1col_1col_111 string, +col_1col_1col_1col_1col_1col_112 string, +col_1col_1col_1col_1col_1col_113 string, +col_1col_1col_1col_1col_1col_114 string, +col_1col_1col_1col_1col_1col_115 string, +col_1col_1col_1col_1col_1col_116 string, +col_1col_1col_1col_1col_1col_117 string, +col_1col_1col_1col_1col_1col_118 string, +col_1col_1col_1col_1col_1col_119 string, +col_1col_1col_1col_1col_1col_120 string, +col_1col_1col_1col_1col_1col_121 string, +col_1col_1col_1col_1col_1col_122 string, +col_1col_1col_1col_1col_1col_123 string, +col_1col_1col_1col_1col_1col_124 string, +col_1col_1col_1col_1col_1col_125 string, +col_1col_1col_1col_1col_1col_126 string, +col_1col_1col_1col_1col_1col_127 string, +col_1col_1col_1col_1col_1col_128 string, +col_1col_1col_1col_1col_1col_129 string, +col_1col_1col_1col_1col_1col_130 string, +col_1col_1col_1col_1col_1col_131 string, +col_1col_1col_1col_1col_1col_132 string, +col_1col_1col_1col_1col_1col_133 string, +col_1col_1col_1col_1col_1col_134 string, +col_1col_1col_1col_1col_1col_135 string, +col_1col_1col_1col_1col_1col_136 string, +col_1col_1col_1col_1col_1col_137 string, +col_1col_1col_1col_1col_1col_138 string, +col_1col_1col_1col_1col_1col_139 string, +col_1col_1col_1col_1col_1col_140 string, +col_1col_1col_1col_1col_1col_141 string, +col_1col_1col_1col_1col_1col_142 string, +col_1col_1col_1col_1col_1col_143 string, +col_1col_1col_1col_1col_1col_144 string, +col_1col_1col_1col_1col_1col_145 string, +col_1col_1col_1col_1col_1col_146 string, +col_1col_1col_1col_1col_1col_147 string, +col_1col_1col_1col_1col_1col_148 string, +col_1col_1col_1col_1col_1col_149 string, +col_1col_1col_1col_1col_1col_150 string, +col_1col_1col_1col_1col_1col_151 string, +col_1col_1col_1col_1col_1col_152 string, +col_1col_1col_1col_1col_1col_153 string, +col_1col_1col_1col_1col_1col_154 string, +col_1col_1col_1col_1col_1col_155 string, +col_1col_1col_1col_1col_1col_156 string, +col_1col_1col_1col_1col_1col_157 string, +col_1col_1col_1col_1col_1col_158 string, +col_1col_1col_1col_1col_1col_159 string, +col_1col_1col_1col_1col_1col_160 string, +col_1col_1col_1col_1col_1col_161 string, +col_1col_1col_1col_1col_1col_162 string, +col_1col_1col_1col_1col_1col_163 string, +col_1col_1col_1col_1col_1col_164 string, +col_1col_1col_1col_1col_1col_165 string, +col_1col_1col_1col_1col_1col_166 string, +col_1col_1col_1col_1col_1col_167 string, +col_1col_1col_1col_1col_1col_168 string, +col_1col_1col_1col_1col_1col_169 string, +col_1col_1col_1col_1col_1col_170 string, +col_1col_1col_1col_1col_1col_171 string, +col_1col_1col_1col_1col_1col_172 string, +col_1col_1col_1col_1col_1col_173 string, +col_1col_1col_1col_1col_1col_174 string, +col_1col_1col_1col_1col_1col_175 string, +col_1col_1col_1col_1col_1col_176 string, +col_1col_1col_1col_1col_1col_177 string, +col_1col_1col_1col_1col_1col_178 string, +col_1col_1col_1col_1col_1col_179 string, +col_1col_1col_1col_1col_1col_180 string, +col_1col_1col_1col_1col_1col_181 string, +col_1col_1col_1col_1col_1col_182 string, +col_1col_1col_1col_1col_1col_183 string, +col_1col_1col_1col_1col_1col_184 string, +col_1col_1col_1col_1col_1col_185 string, +col_1col_1col_1col_1col_1col_186 string, +col_1col_1col_1col_1col_1col_187 string, +col_1col_1col_1col_1col_1col_188 string, +col_1col_1col_1col_1col_1col_189 string, +col_1col_1col_1col_1col_1col_190 string, +col_1col_1col_1col_1col_1col_191 string, +col_1col_1col_1col_1col_1col_192 string, +col_1col_1col_1col_1col_1col_193 string, +col_1col_1col_1col_1col_1col_194 string, +col_1col_1col_1col_1col_1col_195 string, +col_1col_1col_1col_1col_1col_196 string, +col_1col_1col_1col_1col_1col_197 string, +col_1col_1col_1col_1col_1col_198 string, +col_1col_1col_1col_1col_1col_199 string, +col_1col_1col_1col_1col_1col_1100 string, +col_1col_1col_1col_1col_1col_1101 string, +col_1col_1col_1col_1col_1col_1102 string, +col_1col_1col_1col_1col_1col_1103 string, +col_1col_1col_1col_1col_1col_1104 string, +col_1col_1col_1col_1col_1col_1105 string, +col_1col_1col_1col_1col_1col_1106 string, +col_1col_1col_1col_1col_1col_1107 string, +col_1col_1col_1col_1col_1col_1108 string, +col_1col_1col_1col_1col_1col_1109 string, +col_1col_1col_1col_1col_1col_1110 string, +col_1col_1col_1col_1col_1col_1111 string, +col_1col_1col_1col_1col_1col_1112 string, +col_1col_1col_1col_1col_1col_1113 string, +col_1col_1col_1col_1col_1col_1114 string, +col_1col_1col_1col_1col_1col_1115 string, +col_1col_1col_1col_1col_1col_1116 string, +col_1col_1col_1col_1col_1col_1117 string, +col_1col_1col_1col_1col_1col_1118 string, +col_1col_1col_1col_1col_1col_1119 string, +col_1col_1col_1col_1col_1col_1120 string, +col_1col_1col_1col_1col_1col_1121 string, +col_1col_1col_1col_1col_1col_1122 string, +col_1col_1col_1col_1col_1col_1123 string, +col_1col_1col_1col_1col_1col_1124 string, +col_1col_1col_1col_1col_1col_1125 string, +col_1col_1col_1col_1col_1col_1126 string, +col_1col_1col_1col_1col_1col_1127 string, +col_1col_1col_1col_1col_1col_1128 string, +col_1col_1col_1col_1col_1col_1129 string, +col_1col_1col_1col_1col_1col_1130 string, +col_1col_1col_1col_1col_1col_1131 string, +col_1col_1col_1col_1col_1col_1132 string, +col_1col_1col_1col_1col_1col_1133 string, +col_1col_1col_1col_1col_1col_1134 string, +col_1col_1col_1col_1col_1col_1135 string, +col_1col_1col_1col_1col_1col_1136 string, +col_1col_1col_1col_1col_1col_1137 string, +col_1col_1col_1col_1col_1col_1138 string, +col_1col_1col_1col_1col_1col_1139 string, +col_1col_1col_1col_1col_1col_1140 string, +col_1col_1col_1col_1col_1col_1141 string, +col_1col_1col_1col_1col_1col_1142 string, +col_1col_1col_1col_1col_1col_1143 string, +col_1col_1col_1col_1col_1col_1144 string, +col_1col_1col_1col_1col_1col_1145 string, +col_1col_1col_1col_1col_1col_1146 string, +col_1col_1col_1col_1col_1col_1147 string, +col_1col_1col_1col_1col_1col_1148 string, +col_1col_1col_1col_1col_1col_1149 string, +col_1col_1col_1col_1col_1col_1150 string, +col_1col_1col_1col_1col_1col_1151 string, +col_1col_1col_1col_1col_1col_1152 string, +col_1col_1col_1col_1col_1col_1153 string, +col_1col_1col_1col_1col_1col_1154 string, +col_1col_1col_1col_1col_1col_1155 string, +col_1col_1col_1col_1col_1col_1156 string, +col_1col_1col_1col_1col_1col_1157 string, +col_1col_1col_1col_1col_1col_1158 string) + PARTITIONED BY ( + `partition_col` string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@alterPartTbl +PREHOOK: query: alter table alterPartTbl add partition(partition_col='CCL') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Output: default@alterparttbl +POSTHOOK: query: alter table alterPartTbl add partition(partition_col='CCL') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Output: default@alterparttbl +POSTHOOK: Output: default@alterparttbl@partition_col=CCL +PREHOOK: query: drop table alterPartTbl +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@alterparttbl +PREHOOK: Output: default@alterparttbl +POSTHOOK: query: drop table alterPartTbl +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@alterparttbl +POSTHOOK: Output: default@alterparttbl diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java index 5b6a4d3450..51620adf37 100644 --- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java +++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java @@ -744,7 +744,7 @@ private boolean isViewTable(String catName, String dbName, String tblName) throw loopJoinOrderedResult(partitions, queryText, 0, new ApplyFunc() { @Override public void apply(Partition t, Object[] fields) { - t.putToParameters((String)fields[1], (String)fields[2]); + t.putToParameters((String)fields[1], extractSqlClob(fields[2])); }}); // Perform conversion of null map values for (Partition t : partitions.values()) { diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java index 38cef62c7e..85c9711787 100644 --- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java +++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java @@ -202,6 +202,81 @@ public static void prepDb(Configuration conf) throws Exception { " PRIMARY KEY(MRL_TXN_ID))" ); + try { + stmt.execute("CREATE TABLE \"APP\".\"TBLS\" (\"TBL_ID\" BIGINT NOT NULL, " + + " \"CREATE_TIME\" INTEGER NOT NULL, \"DB_ID\" BIGINT, \"LAST_ACCESS_TIME\" INTEGER NOT NULL, " + + " \"OWNER\" VARCHAR(767), \"OWNER_TYPE\" VARCHAR(10), \"RETENTION\" INTEGER NOT NULL, " + + " \"SD_ID\" BIGINT, \"TBL_NAME\" VARCHAR(256), \"TBL_TYPE\" VARCHAR(128), " + + " \"VIEW_EXPANDED_TEXT\" LONG VARCHAR, \"VIEW_ORIGINAL_TEXT\" LONG VARCHAR, " + + " \"IS_REWRITE_ENABLED\" CHAR(1) NOT NULL DEFAULT \'N\', " + + " \"WRITE_ID\" BIGINT DEFAULT 0, " + + " PRIMARY KEY (TBL_ID))" + ); + } catch (SQLException e) { + if (e.getMessage() != null && e.getMessage().contains("already exists")) { + LOG.info("TBLS table already exist, ignoring"); + } else { + throw e; + } + } + + try { + stmt.execute("CREATE TABLE \"APP\".\"DBS\" (\"DB_ID\" BIGINT NOT NULL, \"DESC\" " + + "VARCHAR(4000), \"DB_LOCATION_URI\" VARCHAR(4000) NOT NULL, \"NAME\" VARCHAR(128), " + + "\"OWNER_NAME\" VARCHAR(128), \"OWNER_TYPE\" VARCHAR(10), " + + "\"CTLG_NAME\" VARCHAR(256) NOT NULL, PRIMARY KEY (DB_ID))"); + } catch (SQLException e) { + if (e.getMessage() != null && e.getMessage().contains("already exists")) { + LOG.info("TBLS table already exist, ignoring"); + } else { + throw e; + } + } + + try { + stmt.execute("CREATE TABLE \"APP\".\"PARTITIONS\" (" + + " \"PART_ID\" BIGINT NOT NULL, \"CREATE_TIME\" INTEGER NOT NULL, " + + " \"LAST_ACCESS_TIME\" INTEGER NOT NULL, \"PART_NAME\" VARCHAR(767), " + + " \"SD_ID\" BIGINT, \"TBL_ID\" BIGINT, " + + " \"WRITE_ID\" BIGINT DEFAULT 0, " + + " PRIMARY KEY (PART_ID))" + ); + } catch (SQLException e) { + if (e.getMessage() != null && e.getMessage().contains("already exists")) { + LOG.info("PARTITIONS table already exist, ignoring"); + } else { + throw e; + } + } + + try { + stmt.execute("CREATE TABLE \"APP\".\"TABLE_PARAMS\" (" + + " \"TBL_ID\" BIGINT NOT NULL, \"PARAM_KEY\" VARCHAR(256) NOT NULL, " + + " \"PARAM_VALUE\" CLOB, " + + " PRIMARY KEY (TBL_ID, PARAM_KEY))" + ); + } catch (SQLException e) { + if (e.getMessage() != null && e.getMessage().contains("already exists")) { + LOG.info("TABLE_PARAMS table already exist, ignoring"); + } else { + throw e; + } + } + + try { + stmt.execute("CREATE TABLE \"APP\".\"PARTITION_PARAMS\" (" + + " \"PART_ID\" BIGINT NOT NULL, \"PARAM_KEY\" VARCHAR(256) NOT NULL, " + + " \"PARAM_VALUE\" CLOB, " + + " PRIMARY KEY (PART_ID, PARAM_KEY))" + ); + } catch (SQLException e) { + if (e.getMessage() != null && e.getMessage().contains("already exists")) { + LOG.info("PARTITION_PARAMS table already exist, ignoring"); + } else { + throw e; + } + } + try { stmt.execute("CREATE TABLE \"APP\".\"SEQUENCE_TABLE\" (\"SEQUENCE_NAME\" VARCHAR(256) NOT " + diff --git a/standalone-metastore/src/main/resources/package.jdo b/standalone-metastore/src/main/resources/package.jdo index cccc6774ce..cf982fc9d7 100644 --- a/standalone-metastore/src/main/resources/package.jdo +++ b/standalone-metastore/src/main/resources/package.jdo @@ -499,7 +499,7 @@ - + @@ -546,7 +546,7 @@ - + diff --git a/standalone-metastore/src/main/sql/derby/hive-schema-3.2.0.derby.sql b/standalone-metastore/src/main/sql/derby/hive-schema-3.2.0.derby.sql index 9b9745d33e..cff37c0468 100644 --- a/standalone-metastore/src/main/sql/derby/hive-schema-3.2.0.derby.sql +++ b/standalone-metastore/src/main/sql/derby/hive-schema-3.2.0.derby.sql @@ -60,7 +60,7 @@ CREATE TABLE "APP"."TYPES" ("TYPES_ID" BIGINT NOT NULL, "TYPE_NAME" VARCHAR(128) CREATE TABLE "APP"."GLOBAL_PRIVS" ("USER_GRANT_ID" BIGINT NOT NULL, "CREATE_TIME" INTEGER NOT NULL, "GRANT_OPTION" SMALLINT NOT NULL, "GRANTOR" VARCHAR(128), "GRANTOR_TYPE" VARCHAR(128), "PRINCIPAL_NAME" VARCHAR(128), "PRINCIPAL_TYPE" VARCHAR(128), "USER_PRIV" VARCHAR(128), "AUTHORIZER" VARCHAR(128)); -CREATE TABLE "APP"."PARTITION_PARAMS" ("PART_ID" BIGINT NOT NULL, "PARAM_KEY" VARCHAR(256) NOT NULL, "PARAM_VALUE" VARCHAR(4000)); +CREATE TABLE "APP"."PARTITION_PARAMS" ("PART_ID" BIGINT NOT NULL, "PARAM_KEY" VARCHAR(256) NOT NULL, "PARAM_VALUE" CLOB); CREATE TABLE "APP"."PARTITION_EVENTS" ( "PART_NAME_ID" BIGINT NOT NULL, diff --git a/standalone-metastore/src/main/sql/derby/upgrade-3.1.0-to-3.2.0.derby.sql b/standalone-metastore/src/main/sql/derby/upgrade-3.1.0-to-3.2.0.derby.sql index 1a8b26cce3..d9829c37bd 100644 --- a/standalone-metastore/src/main/sql/derby/upgrade-3.1.0-to-3.2.0.derby.sql +++ b/standalone-metastore/src/main/sql/derby/upgrade-3.1.0-to-3.2.0.derby.sql @@ -19,5 +19,11 @@ INSERT INTO SEQUENCE_TABLE (SEQUENCE_NAME, NEXT_VAL) VALUES ('org.apache.hadoop. ALTER TABLE "APP"."DBS" ADD COLUMN CREATE_TIME INTEGER; ALTER TABLE "APP"."CTLGS" ADD COLUMN CREATE_TIME INTEGER; +-- HIVE-20221: change PARTITION_PARAMS.PARAM_VALUE to CLOB +ALTER TABLE "APP"."PARTITION_PARAMS" ADD COLUMN "PARAM_VALUE_CLOB" CLOB; +UPDATE "APP"."PARTITION_PARAMS" SET PARAM_VALUE_CLOB=CAST(PARAM_VALUE AS CLOB); +ALTER TABLE "APP"."PARTITION_PARAMS" DROP COLUMN PARAM_VALUE; +RENAME COLUMN "APP"."PARTITION_PARAMS"."PARAM_VALUE_CLOB" TO "PARAM_VALUE"; + -- This needs to be the last thing done. Insert any changes above this line. UPDATE "APP".VERSION SET SCHEMA_VERSION='3.2.0', VERSION_COMMENT='Hive release version 3.2.0' where VER_ID=1; diff --git a/standalone-metastore/src/main/sql/mssql/hive-schema-3.2.0.mssql.sql b/standalone-metastore/src/main/sql/mssql/hive-schema-3.2.0.mssql.sql index df0b0da8b7..cd04b4cc1a 100644 --- a/standalone-metastore/src/main/sql/mssql/hive-schema-3.2.0.mssql.sql +++ b/standalone-metastore/src/main/sql/mssql/hive-schema-3.2.0.mssql.sql @@ -599,7 +599,7 @@ CREATE TABLE PARTITION_PARAMS ( PART_ID bigint NOT NULL, PARAM_KEY nvarchar(256) NOT NULL, - PARAM_VALUE nvarchar(4000) NULL + PARAM_VALUE varchar(max) NULL ); ALTER TABLE PARTITION_PARAMS ADD CONSTRAINT PARTITION_PARAMS_PK PRIMARY KEY (PART_ID,PARAM_KEY); diff --git a/standalone-metastore/src/main/sql/mssql/upgrade-3.1.0-to-3.2.0.mssql.sql b/standalone-metastore/src/main/sql/mssql/upgrade-3.1.0-to-3.2.0.mssql.sql index a5bcf786ac..f2031c8263 100644 --- a/standalone-metastore/src/main/sql/mssql/upgrade-3.1.0-to-3.2.0.mssql.sql +++ b/standalone-metastore/src/main/sql/mssql/upgrade-3.1.0-to-3.2.0.mssql.sql @@ -20,6 +20,9 @@ INSERT INTO SEQUENCE_TABLE (SEQUENCE_NAME, NEXT_VAL) VALUES ('org.apache.hadoop. ALTER TABLE DBS ADD CREATE_TIME INT; ALTER TABLE CTLGS ADD CREATE_TIME INT; +-- HIVE-20221 +ALTER TABLE "SERDE_PARAMS" ALTER COLUMN "PARAM_VALUE" nvarchar(MAX); + -- These lines need to be last. Insert any changes above. UPDATE VERSION SET SCHEMA_VERSION='3.2.0', VERSION_COMMENT='Hive release version 3.2.0' where VER_ID=1; SELECT 'Finished upgrading MetaStore schema from 3.1.0 to 3.2.0' AS MESSAGE; diff --git a/standalone-metastore/src/main/sql/mysql/hive-schema-3.2.0.mysql.sql b/standalone-metastore/src/main/sql/mysql/hive-schema-3.2.0.mysql.sql index 7e884834a4..bd0447e3e9 100644 --- a/standalone-metastore/src/main/sql/mysql/hive-schema-3.2.0.mysql.sql +++ b/standalone-metastore/src/main/sql/mysql/hive-schema-3.2.0.mysql.sql @@ -297,7 +297,7 @@ CREATE TABLE IF NOT EXISTS `PARTITION_KEY_VALS` ( CREATE TABLE IF NOT EXISTS `PARTITION_PARAMS` ( `PART_ID` bigint(20) NOT NULL, `PARAM_KEY` varchar(256) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, - `PARAM_VALUE` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, + `PARAM_VALUE` MEDIUMTEXT CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (`PART_ID`,`PARAM_KEY`), KEY `PARTITION_PARAMS_N49` (`PART_ID`), CONSTRAINT `PARTITION_PARAMS_FK1` FOREIGN KEY (`PART_ID`) REFERENCES `PARTITIONS` (`PART_ID`) diff --git a/standalone-metastore/src/main/sql/mysql/upgrade-3.1.0-to-3.2.0.mysql.sql b/standalone-metastore/src/main/sql/mysql/upgrade-3.1.0-to-3.2.0.mysql.sql index 0865904401..d408bf11c3 100644 --- a/standalone-metastore/src/main/sql/mysql/upgrade-3.1.0-to-3.2.0.mysql.sql +++ b/standalone-metastore/src/main/sql/mysql/upgrade-3.1.0-to-3.2.0.mysql.sql @@ -20,6 +20,9 @@ INSERT INTO `SEQUENCE_TABLE` (`SEQUENCE_NAME`, `NEXT_VAL`) VALUES ('org.apache.h ALTER TABLE `DBS` ADD `CREATE_TIME` INT(11); ALTER TABLE `CTLGS` ADD `CREATE_TIME` INT(11); +-- HIVE-20221 +ALTER TABLE PARTITION_PARAMS MODIFY PARAM_VALUE MEDIUMTEXT; + -- These lines need to be last. Insert any changes above. UPDATE VERSION SET SCHEMA_VERSION='3.2.0', VERSION_COMMENT='Hive release version 3.2.0' where VER_ID=1; SELECT 'Finished upgrading MetaStore schema from 3.1.0 to 3.2.0' AS ' '; diff --git a/standalone-metastore/src/main/sql/oracle/hive-schema-3.2.0.oracle.sql b/standalone-metastore/src/main/sql/oracle/hive-schema-3.2.0.oracle.sql index 36a46963a5..fb4fab1d60 100644 --- a/standalone-metastore/src/main/sql/oracle/hive-schema-3.2.0.oracle.sql +++ b/standalone-metastore/src/main/sql/oracle/hive-schema-3.2.0.oracle.sql @@ -107,7 +107,7 @@ CREATE TABLE PARTITION_PARAMS ( PART_ID NUMBER NOT NULL, PARAM_KEY VARCHAR2(256) NOT NULL, - PARAM_VALUE VARCHAR2(4000) NULL + PARAM_VALUE CLOB NULL ); ALTER TABLE PARTITION_PARAMS ADD CONSTRAINT PARTITION_PARAMS_PK PRIMARY KEY (PART_ID,PARAM_KEY); diff --git a/standalone-metastore/src/main/sql/oracle/upgrade-3.1.0-to-3.2.0.oracle.sql b/standalone-metastore/src/main/sql/oracle/upgrade-3.1.0-to-3.2.0.oracle.sql index 5cdbf78d8a..4d0a868352 100644 --- a/standalone-metastore/src/main/sql/oracle/upgrade-3.1.0-to-3.2.0.oracle.sql +++ b/standalone-metastore/src/main/sql/oracle/upgrade-3.1.0-to-3.2.0.oracle.sql @@ -22,6 +22,13 @@ INSERT INTO SEQUENCE_TABLE (SEQUENCE_NAME, NEXT_VAL) VALUES ('org.apache.hadoop. ALTER TABLE DBS add CREATE_TIME NUMBER(10); ALTER TABLE CTLGS add CREATE_TIME NUMBER(10); +-- HIVE-20221 +ALTER TABLE PARTITION_PARAMS ADD (TEMP CLOB); +UPDATE PARTITION_PARAMS SET TEMP=PARAM_VALUE, PARAM_VALUE=NULL; +ALTER TABLE PARTITION_PARAMS DROP COLUMN PARAM_VALUE; +ALTER TABLE PARTITION_PARAMS RENAME COLUMN TEMP TO PARAM_VALUE; + + -- These lines need to be last. Insert any changes above. UPDATE VERSION SET SCHEMA_VERSION='3.2.0', VERSION_COMMENT='Hive release version 3.2.0' where VER_ID=1; SELECT 'Finished upgrading MetaStore schema from 3.1.0 to 3.2.0' AS Status from dual; diff --git a/standalone-metastore/src/main/sql/postgres/hive-schema-3.2.0.postgres.sql b/standalone-metastore/src/main/sql/postgres/hive-schema-3.2.0.postgres.sql index b27d8303b2..3854905cfd 100644 --- a/standalone-metastore/src/main/sql/postgres/hive-schema-3.2.0.postgres.sql +++ b/standalone-metastore/src/main/sql/postgres/hive-schema-3.2.0.postgres.sql @@ -220,7 +220,7 @@ CREATE TABLE "PARTITION_KEY_VALS" ( CREATE TABLE "PARTITION_PARAMS" ( "PART_ID" bigint NOT NULL, "PARAM_KEY" character varying(256) NOT NULL, - "PARAM_VALUE" character varying(4000) DEFAULT NULL::character varying + "PARAM_VALUE" text DEFAULT NULL ); diff --git a/standalone-metastore/src/main/sql/postgres/upgrade-3.1.0-to-3.2.0.postgres.sql b/standalone-metastore/src/main/sql/postgres/upgrade-3.1.0-to-3.2.0.postgres.sql index 6553111de2..bd507a9802 100644 --- a/standalone-metastore/src/main/sql/postgres/upgrade-3.1.0-to-3.2.0.postgres.sql +++ b/standalone-metastore/src/main/sql/postgres/upgrade-3.1.0-to-3.2.0.postgres.sql @@ -20,6 +20,9 @@ INSERT INTO "SEQUENCE_TABLE" ("SEQUENCE_NAME", "NEXT_VAL") VALUES ('org.apache.h ALTER TABLE "DBS" ADD "CREATE_TIME" BIGINT; ALTER TABLE "CTLGS" ADD "CREATE_TIME" BIGINT; +-- HIVE-20221 +alter table "PARTITION_PARAMS" alter column "PARAM_VALUE" type text using cast("PARAM_VALUE" as text); + -- These lines need to be last. Insert any changes above. UPDATE "VERSION" SET "SCHEMA_VERSION"='3.2.0', "VERSION_COMMENT"='Hive release version 3.2.0' where "VER_ID"=1; SELECT 'Finished upgrading MetaStore schema from 3.1.0 to 3.2.0';