mirror of
https://github.com/apache/impala.git
synced 2026-01-22 00:01:21 -05:00
String values from external systems (HDFS, Hive, Kudu, etc.) are already unescaped, the same as string values in Thrift objects deserialized in coordinators. We should mark needsUnescaping_ as false in creating StringLiterals for these values (in LiteralExpr#create()). When comparing StringLiterals in partition pruning, we should also use the unescaped values if needsUnescaping_ is true. Tests: - Add tests for partition pruning on unescaped strings. - Add test coverage for all existing code paths using LiteralExpr#create(). - Run core tests Change-Id: Iea8070f16a74f9aeade294504f2834abb8b3b38f Reviewed-on: http://gerrit.cloudera.org:8080/15278 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
19 KiB
19 KiB
| 1 | # Table level constraints: |
|---|---|
| 2 | # Allows for defining constraints on which file formats to generate for an individual |
| 3 | # table. The table name should match the base table name defined in the schema template |
| 4 | # file. |
| 5 | table_name:stringids, constraint:restrict_to, table_format:hbase/none/none |
| 6 | table_name:hbasecolumnfamilies, constraint:restrict_to, table_format:hbase/none/none |
| 7 | table_name:insertalltypesagg, constraint:restrict_to, table_format:hbase/none/none |
| 8 | table_name:alltypessmallbinary, constraint:restrict_to, table_format:hbase/none/none |
| 9 | table_name:insertalltypesaggbinary, constraint:restrict_to, table_format:hbase/none/none |
| 10 | table_name:hbasealltypeserror, constraint:restrict_to, table_format:hbase/none/none |
| 11 | table_name:hbasealltypeserrornonulls, constraint:restrict_to, table_format:hbase/none/none |
| 12 | table_name:alltypesinsert, constraint:restrict_to, table_format:text/none/none |
| 13 | table_name:stringpartitionkey, constraint:restrict_to, table_format:text/none/none |
| 14 | table_name:alltypesnopart_insert, constraint:restrict_to, table_format:text/none/none |
| 15 | table_name:insert_overwrite_nopart, constraint:restrict_to, table_format:text/none/none |
| 16 | table_name:insert_overwrite_partitioned, constraint:restrict_to, table_format:text/none/none |
| 17 | table_name:insert_string_partitioned, constraint:restrict_to, table_format:text/none/none |
| 18 | table_name:alltypesinsert, constraint:restrict_to, table_format:parquet/none/none |
| 19 | table_name:alltypesnopart_insert, constraint:restrict_to, table_format:parquet/none/none |
| 20 | table_name:alltypesinsert, constraint:restrict_to, table_format:text/none/none |
| 21 | table_name:alltypesnopart_insert, constraint:restrict_to, table_format:text/none/none |
| 22 | table_name:insert_overwrite_nopart, constraint:restrict_to, table_format:text/none/none |
| 23 | table_name:insert_overwrite_partitioned, constraint:restrict_to, table_format:text/none/none |
| 24 | table_name:insert_string_partitioned, constraint:restrict_to, table_format:text/none/none |
| 25 | table_name:alltypesinsert, constraint:restrict_to, table_format:parquet/none/none |
| 26 | table_name:alltypesnopart_insert, constraint:restrict_to, table_format:parquet/none/none |
| 27 | table_name:insert_overwrite_nopart, constraint:restrict_to, table_format:parquet/none/none |
| 28 | table_name:insert_overwrite_partitioned, constraint:restrict_to, table_format:parquet/none/none |
| 29 | table_name:insert_string_partitioned, constraint:restrict_to, table_format:parquet/none/none |
| 30 | table_name:old_rcfile_table, constraint:restrict_to, table_format:rc/none/none |
| 31 | table_name:bad_text_lzo, constraint:restrict_to, table_format:text/lzo/block |
| 32 | table_name:bad_text_gzip, constraint:restrict_to, table_format:text/gzip/block |
| 33 | table_name:bad_seq_snap, constraint:restrict_to, table_format:seq/snap/block |
| 34 | table_name:bad_avro_snap_strings, constraint:restrict_to, table_format:avro/snap/block |
| 35 | table_name:bad_avro_snap_floats, constraint:restrict_to, table_format:avro/snap/block |
| 36 | table_name:bad_avro_decimal_schema, constraint:restrict_to, table_format:avro/snap/block |
| 37 | table_name:bad_avro_date_out_of_range, constraint:restrict_to, table_format:avro/snap/block |
| 38 | table_name:hive2_bad_avro_date_pre_gregorian, constraint:restrict_to, table_format:avro/snap/block |
| 39 | table_name:hive3_avro_date_pre_gregorian, constraint:restrict_to, table_format:avro/snap/block |
| 40 | table_name:bad_parquet, constraint:restrict_to, table_format:parquet/none/none |
| 41 | table_name:bad_parquet_strings_negative_len, constraint:restrict_to, table_format:parquet/none/none |
| 42 | table_name:bad_parquet_strings_out_of_bounds, constraint:restrict_to, table_format:parquet/none/none |
| 43 | table_name:bad_magic_number, constraint:restrict_to, table_format:parquet/none/none |
| 44 | table_name:bad_metadata_len, constraint:restrict_to, table_format:parquet/none/none |
| 45 | table_name:bad_dict_page_offset, constraint:restrict_to, table_format:parquet/none/none |
| 46 | table_name:bad_compressed_size, constraint:restrict_to, table_format:parquet/none/none |
| 47 | table_name:alltypesagg_hive_13_1, constraint:restrict_to, table_format:parquet/none/none |
| 48 | table_name:kite_required_fields, constraint:restrict_to, table_format:parquet/none/none |
| 49 | table_name:bad_column_metadata, constraint:restrict_to, table_format:parquet/none/none |
| 50 | table_name:lineitem_multiblock, constraint:restrict_to, table_format:parquet/none/none |
| 51 | table_name:lineitem_sixblocks, constraint:restrict_to, table_format:parquet/none/none |
| 52 | table_name:lineitem_multiblock_one_row_group, constraint:restrict_to, table_format:parquet/none/none |
| 53 | table_name:customer_multiblock, constraint:restrict_to, table_format:parquet/none/none |
| 54 | table_name:hudi_partitioned, constraint:restrict_to, table_format:parquet/none/none |
| 55 | table_name:hudi_non_partitioned, constraint:restrict_to, table_format:parquet/none/none |
| 56 | table_name:hudi_as_parquet, constraint:restrict_to, table_format:parquet/none/none |
| 57 | # TODO: Support Avro. Data loading currently fails for Avro because complex types |
| 58 | # cannot be converted to the corresponding Avro types yet. |
| 59 | table_name:allcomplextypes, constraint:restrict_to, table_format:text/none/none |
| 60 | table_name:allcomplextypes, constraint:restrict_to, table_format:parquet/none/none |
| 61 | table_name:allcomplextypes, constraint:restrict_to, table_format:hbase/none/none |
| 62 | table_name:functional, constraint:restrict_to, table_format:text/none/none |
| 63 | table_name:complextypes_fileformat, constraint:restrict_to, table_format:text/none/none |
| 64 | table_name:complextypes_fileformat, constraint:restrict_to, table_format:parquet/none/none |
| 65 | table_name:complextypes_fileformat, constraint:restrict_to, table_format:avro/snap/block |
| 66 | table_name:complextypes_fileformat, constraint:restrict_to, table_format:rc/snap/block |
| 67 | table_name:complextypes_fileformat, constraint:restrict_to, table_format:seq/snap/block |
| 68 | table_name:complextypes_fileformat, constraint:restrict_to, table_format:orc/def/block |
| 69 | table_name:complextypes_multifileformat, constraint:restrict_to, table_format:text/none/none |
| 70 | # TODO: Avro |
| 71 | table_name:complextypestbl, constraint:restrict_to, table_format:parquet/none/none |
| 72 | table_name:complextypestbl, constraint:restrict_to, table_format:orc/def/block |
| 73 | table_name:complextypestbl_medium, constraint:restrict_to, table_format:parquet/none/none |
| 74 | table_name:complextypestbl_medium, constraint:restrict_to, table_format:orc/def/block |
| 75 | table_name:alltypeserror, constraint:exclude, table_format:parquet/none/none |
| 76 | table_name:alltypeserrornonulls, constraint:exclude, table_format:parquet/none/none |
| 77 | table_name:unsupported_types, constraint:exclude, table_format:parquet/none/none |
| 78 | table_name:escapechartesttable, constraint:exclude, table_format:parquet/none/none |
| 79 | table_name:TblWithRaggedColumns, constraint:exclude, table_format:parquet/none/none |
| 80 | # the text_ tables are for testing test delimiters and escape chars in text files |
| 81 | table_name:text_comma_backslash_newline, constraint:restrict_to, table_format:text/none/none |
| 82 | table_name:text_dollar_hash_pipe, constraint:restrict_to, table_format:text/none/none |
| 83 | table_name:text_thorn_ecirc_newline, constraint:restrict_to, table_format:text/none/none |
| 84 | table_name:bad_serde, constraint:restrict_to, table_format:text/none/none |
| 85 | table_name:rcfile_lazy_binary_serde, constraint:restrict_to, table_format:rc/none/none |
| 86 | table_name:unsupported_partition_types, constraint:restrict_to, table_format:text/none/none |
| 87 | table_name:nullformat_custom, constraint:exclude, table_format:parquet/none/none |
| 88 | table_name:alltypes_view, constraint:restrict_to, table_format:text/none/none |
| 89 | table_name:allcomplextypes_view, constraint:restrict_to, table_format:text/none/none |
| 90 | table_name:alltypes_view, constraint:restrict_to, table_format:seq/snap/block |
| 91 | table_name:alltypes_hive_view, constraint:restrict_to, table_format:text/none/none |
| 92 | table_name:alltypes_view_sub, constraint:restrict_to, table_format:text/none/none |
| 93 | table_name:alltypes_view_sub, constraint:restrict_to, table_format:seq/snap/block |
| 94 | table_name:alltypes_parens, constraint:restrict_to, table_format:text/none/none |
| 95 | table_name:complex_view, constraint:restrict_to, table_format:text/none/none |
| 96 | table_name:complex_view, constraint:restrict_to, table_format:seq/snap/block |
| 97 | table_name:view_view, constraint:restrict_to, table_format:text/none/none |
| 98 | table_name:view_view, constraint:restrict_to, table_format:seq/snap/block |
| 99 | table_name:subquery_view, constraint:restrict_to, table_format:seq/snap/block |
| 100 | table_name:subquery_view, constraint:restrict_to, table_format:rc/none/none |
| 101 | # liketbl, tblwithraggedcolumns and manynulls all have |
| 102 | # NULLs in primary key columns. hbase does not support |
| 103 | # writing NULLs to primary key columns. |
| 104 | table_name:liketbl, constraint:exclude, table_format:hbase/none/none |
| 105 | table_name:manynulls, constraint:exclude, table_format:hbase/none/none |
| 106 | table_name:tblwithraggedcolumns, constraint:exclude, table_format:hbase/none/none |
| 107 | # Tables with only one column are not supported in hbase. |
| 108 | table_name:greptiny, constraint:exclude, table_format:hbase/none/none |
| 109 | table_name:tinyinttable, constraint:exclude, table_format:hbase/none/none |
| 110 | # overflow uses a manually constructed text file which doesn't make sense to write to |
| 111 | # other table formats since the values that would be written are different (e.g. already |
| 112 | # truncated.) |
| 113 | table_name:overflow, constraint:restrict_to, table_format:text/none/none |
| 114 | # widerow has a single column with a single row containing a 10MB string. hbase doesn't |
| 115 | # seem to like this. |
| 116 | table_name:widerow, constraint:exclude, table_format:hbase/none/none |
| 117 | # nullformat_custom is used in null-insert tests, which user insert overwrite, |
| 118 | # which is not supported in hbase. The schema is also specified in HIVE_CREATE |
| 119 | # with no corresponding LOAD statement. |
| 120 | table_name:nullformat_custom, constraint:exclude, table_format:hbase/none/none |
| 121 | table_name:unsupported_types, constraint:exclude, table_format:hbase/none/none |
| 122 | # Decimal can only be tested on formats Impala can write to (text and parquet). |
| 123 | # TODO: add Avro once Hive or Impala can write Avro decimals |
| 124 | table_name:decimal_tbl, constraint:restrict_to, table_format:text/none/none |
| 125 | table_name:decimal_tiny, constraint:restrict_to, table_format:text/none/none |
| 126 | table_name:decimal_tbl, constraint:restrict_to, table_format:parquet/none/none |
| 127 | table_name:decimal_tiny, constraint:restrict_to, table_format:parquet/none/none |
| 128 | table_name:decimal_tbl, constraint:restrict_to, table_format:kudu/none/none |
| 129 | table_name:decimal_tiny, constraint:restrict_to, table_format:kudu/none/none |
| 130 | table_name:decimal_tbl, constraint:restrict_to, table_format:orc/def/block |
| 131 | table_name:decimal_tiny, constraint:restrict_to, table_format:orc/def/block |
| 132 | table_name:decimal_rtf_tbl, constraint:restrict_to, table_format:text/none/none |
| 133 | table_name:decimal_rtf_tbl, constraint:restrict_to, table_format:parquet/none/none |
| 134 | table_name:decimal_rtf_tbl, constraint:restrict_to, table_format:kudu/none/none |
| 135 | table_name:decimal_rtf_tbl, constraint:restrict_to, table_format:orc/def/block |
| 136 | table_name:decimal_rtf_tiny_tbl, constraint:restrict_to, table_format:text/none/none |
| 137 | table_name:decimal_rtf_tiny_tbl, constraint:restrict_to, table_format:parquet/none/none |
| 138 | table_name:decimal_rtf_tiny_tbl, constraint:restrict_to, table_format:kudu/none/none |
| 139 | table_name:decimal_rtf_tiny_tbl, constraint:restrict_to, table_format:orc/def/block |
| 140 | table_name:avro_decimal_tbl, constraint:restrict_to, table_format:avro/snap/block |
| 141 | # CHAR is not supported by HBase. |
| 142 | table_name:chars_tiny, constraint:exclude, table_format:hbase/none/none |
| 143 | table_name:chars_medium, constraint:exclude, table_format:hbase/none/none |
| 144 | # invalid_decimal_part_tbl[1,2,3] tables are used for testing invalid decimal |
| 145 | # partition key values (see IMPALA-1040) |
| 146 | table_name:invalid_decimal_part_tbl1, constraint:restrict_to, table_format:text/none/none |
| 147 | table_name:invalid_decimal_part_tbl2, constraint:restrict_to, table_format:text/none/none |
| 148 | table_name:invalid_decimal_part_tbl3, constraint:restrict_to, table_format:text/none/none |
| 149 | table_name:avro_decimal_tbl, constraint:restrict_to, table_format:avro/snap/block |
| 150 | # testescape tables are used for testing text scanner delimiter handling |
| 151 | table_name:table_no_newline, constraint:restrict_to, table_format:text/none/none |
| 152 | table_name:table_no_newline_part, constraint:restrict_to, table_format:text/none/none |
| 153 | table_name:testescape_16_lf, constraint:restrict_to, table_format:text/none/none |
| 154 | table_name:testescape_16_crlf, constraint:restrict_to, table_format:text/none/none |
| 155 | table_name:testescape_17_lf, constraint:restrict_to, table_format:text/none/none |
| 156 | table_name:testescape_17_crlf, constraint:restrict_to, table_format:text/none/none |
| 157 | table_name:testescape_32_lf, constraint:restrict_to, table_format:text/none/none |
| 158 | table_name:testescape_32_crlf, constraint:restrict_to, table_format:text/none/none |
| 159 | # alltimezones is used to verify that impala properly deals with timezones |
| 160 | table_name:alltimezones, constraint:restrict_to, table_format:text/none/none |
| 161 | # Avro schema is inferred from the column definitions (IMPALA-1136) |
| 162 | table_name:no_avro_schema, constraint:restrict_to, table_format:avro/snap/block |
| 163 | table_name:avro_unicode_nulls, constraint:restrict_to, table_format:avro/snap/block |
| 164 | # test single and multi stream bz2 files |
| 165 | table_name:bzip2_tbl, constraint:restrict_to, table_format:text/bzip/block |
| 166 | table_name:large_bzip2_tbl, constraint:restrict_to, table_format:text/bzip/block |
| 167 | table_name:multistream_bzip2_tbl, constraint:restrict_to, table_format:text/bzip/block |
| 168 | table_name:large_multistream_bzip2_tbl, constraint:restrict_to, table_format:text/bzip/block |
| 169 | # Kudu can't handle certain types such as timestamp so we pick and choose the tables |
| 170 | # we actually use for Kudu related tests. |
| 171 | table_name:alltypes, constraint:only, table_format:kudu/none/none |
| 172 | table_name:alltypessmall, constraint:only, table_format:kudu/none/none |
| 173 | table_name:alltypestiny, constraint:only, table_format:kudu/none/none |
| 174 | table_name:alltypesagg, constraint:only, table_format:kudu/none/none |
| 175 | table_name:alltypesaggnonulls, constraint:only, table_format:kudu/none/none |
| 176 | table_name:testtbl, constraint:only, table_format:kudu/none/none |
| 177 | table_name:jointbl, constraint:only, table_format:kudu/none/none |
| 178 | table_name:emptytable, constraint:only, table_format:kudu/none/none |
| 179 | table_name:dimtbl, constraint:only, table_format:kudu/none/none |
| 180 | table_name:tinytable, constraint:only, table_format:kudu/none/none |
| 181 | table_name:tinyinttable, constraint:only, table_format:kudu/none/none |
| 182 | table_name:zipcode_incomes, constraint:only, table_format:kudu/none/none |
| 183 | table_name:nulltable, constraint:only, table_format:kudu/none/none |
| 184 | table_name:nullrows, constraint:only, table_format:kudu/none/none |
| 185 | table_name:nullescapedtable, constraint:only, table_format:kudu/none/none |
| 186 | table_name:decimal_tbl, constraint:only, table_format:kudu/none/none |
| 187 | table_name:decimal_rtf_tbl, constraint:only, table_format:kudu/none/none |
| 188 | table_name:decimal_rtf_tiny_tbl, constraint:only, table_format:kudu/none/none |
| 189 | table_name:decimal_tiny, constraint:only, table_format:kudu/none/none |
| 190 | table_name:strings_with_quotes, constraint:only, table_format:kudu/none/none |
| 191 | table_name:manynulls, constraint:only, table_format:kudu/none/none |
| 192 | # Skipping header lines is only effective with text tables |
| 193 | table_name:table_with_header, constraint:restrict_to, table_format:text/none/none |
| 194 | table_name:table_with_header_2, constraint:restrict_to, table_format:text/none/none |
| 195 | table_name:table_with_header_insert, constraint:restrict_to, table_format:text/none/none |
| 196 | # We also test that skipping header lines works on compressed tables (IMPALA-5287) |
| 197 | table_name:table_with_header, constraint:restrict_to, table_format:text/gzip/block |
| 198 | table_name:table_with_header_2, constraint:restrict_to, table_format:text/gzip/block |
| 199 | table_name:table_with_header_insert, constraint:restrict_to, table_format:text/gzip/block |
| 200 | # Inserting into parquet tables should not be affected by the 'skip.header.line.count' |
| 201 | # property, so we test parquet format as well. |
| 202 | table_name:table_with_header_insert, constraint:restrict_to, table_format:parquet/none/none |
| 203 | # IMPALA-7368/IMPALA-7370/IMPALA-8198 adds DATE support for text, hbase, parquet and avro. |
| 204 | # IMPALA-8801 adds DATE support for ORC. |
| 205 | # Other file-formats will be introduced later. |
| 206 | table_name:date_tbl, constraint:restrict_to, table_format:parquet/none/none |
| 207 | table_name:date_tbl, constraint:restrict_to, table_format:avro/snap/block |
| 208 | table_name:date_tbl, constraint:restrict_to, table_format:orc/def/block |
| 209 | table_name:date_tbl, constraint:restrict_to, table_format:hbase/none/none |
| 210 | table_name:date_tbl, constraint:restrict_to, table_format:text/none/none |
| 211 | table_name:date_tbl, constraint:restrict_to, table_format:text/lzo/block |
| 212 | table_name:date_tbl, constraint:restrict_to, table_format:text/bzip/block |
| 213 | table_name:date_tbl, constraint:restrict_to, table_format:text/gzip/block |
| 214 | table_name:date_tbl, constraint:restrict_to, table_format:text/snap/block |
| 215 | table_name:date_tbl, constraint:restrict_to, table_format:text/def/block |
| 216 | table_name:date_tbl_error, constraint:restrict_to, table_format:text/none/none |
| 217 | table_name:date_tbl_error, constraint:restrict_to, table_format:text/lzo/block |
| 218 | table_name:date_tbl_error, constraint:restrict_to, table_format:text/bzip/block |
| 219 | table_name:date_tbl_error, constraint:restrict_to, table_format:text/gzip/block |
| 220 | table_name:date_tbl_error, constraint:restrict_to, table_format:text/snap/block |
| 221 | table_name:date_tbl_error, constraint:restrict_to, table_format:text/def/block |
| 222 | table_name:insert_date_tbl, constraint:restrict_to, table_format:hbase/none/none |
| 223 | # Full transactional table is only supported for ORC |
| 224 | table_name:full_transactional_table, constraint:restrict_to, table_format:orc/def/block |
| 225 | # Insert-only transactional tables only work for file-format based tables |
| 226 | table_name:insert_only_transactional_table, constraint:exclude, table_format:hbase/none/none |
| 227 | table_name:insert_only_transactional_table, constraint:exclude, table_format:kudu/none/none |
| 228 | table_name:insertonly_nopart_insert, constraint:restrict_to, table_format:text/none/none |
| 229 | table_name:insertonly_nopart_insert, constraint:restrict_to, table_format:parquet/none/none |
| 230 | table_name:insertonly_part_insert, constraint:restrict_to, table_format:text/none/none |
| 231 | table_name:insertonly_part_insert, constraint:restrict_to, table_format:parquet/none/none |
| 232 | # 'materialized_view' is based on 'insert_only_transactional_table' from the same |
| 233 | # database, so it needs to be excluded where 'insert_only_transactional_table' is |
| 234 | # excluded. |
| 235 | table_name:materialized_view, constraint:exclude, table_format:hbase/none/none |
| 236 | table_name:materialized_view, constraint:exclude, table_format:kudu/none/none |
| 237 | table_name:insert_only_transactional_bucketed_table, constraint:exclude, table_format:hbase/none/none |
| 238 | table_name:insert_only_transactional_bucketed_table, constraint:exclude, table_format:kudu/none/none |
| 239 | # Bucketed tables only work for file-format based tables |
| 240 | table_name:bucketed_ext_table, constraint:exclude, table_format:hbase/none/none |
| 241 | table_name:bucketed_ext_table, constraint:exclude, table_format:kudu/none/none |
| 242 | table_name:bucketed_table, constraint:exclude, table_format:hbase/none/none |
| 243 | table_name:bucketed_table, constraint:exclude, table_format:kudu/none/none |
| 244 | table_name:bucketed_table, constraint:exclude, table_format:text/lzo/block |
| 245 | # The uncompressed ORC tables are mainly used in test_scanners_fuzz.py to avoid creating |
| 246 | # them each time when running the test. Developers may run this test many times locally. |
| 247 | table_name:uncomp_src_alltypes, constraint:restrict_to, table_format:orc/def/block |
| 248 | table_name:uncomp_src_decimal_tbl, constraint:restrict_to, table_format:orc/def/block |
| 249 | table_name:part_strings_with_quotes, constraint:restrict_to, table_format:text/none/none |