mirror of
https://github.com/apache/impala.git
synced 2026-02-01 21:00:29 -05:00
SHOW FILES on Iceberg tables lists all files in table directory. Even deleted files and metadata files. We should only shows the current data files. Testing: - existing tests Change-Id: If07c2fd6e05e494f7240ccc147b8776a8f217179 Reviewed-on: http://gerrit.cloudera.org:8080/18455 Reviewed-by: Zoltan Borok-Nagy <boroknagyz@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
163 lines
4.2 KiB
Plaintext
163 lines
4.2 KiB
Plaintext
====
|
|
---- QUERY
|
|
CREATE TABLE iceberg_hadoop_catalogs(
|
|
label STRING,
|
|
val decimal(10,2)
|
|
)
|
|
PARTITIONED BY SPEC(label)
|
|
STORED AS ICEBERG
|
|
TBLPROPERTIES('iceberg.catalog'='ice_hadoop_cat');
|
|
====
|
|
---- QUERY
|
|
DESCRIBE FORMATTED iceberg_hadoop_catalogs;
|
|
---- RESULTS: VERIFY_IS_SUBSET
|
|
'Location: ','$NAMENODE/test-warehouse/ice_hadoop_cat/$DATABASE/iceberg_hadoop_catalogs','NULL'
|
|
'','write.format.default','parquet '
|
|
'','iceberg.catalog ','ice_hadoop_cat '
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
CREATE TABLE iceberg_hadoop_catalogs_with_id(
|
|
label STRING,
|
|
val decimal(10,2)
|
|
)
|
|
PARTITIONED BY SPEC(label)
|
|
STORED AS ICEBERG
|
|
TBLPROPERTIES('iceberg.catalog'='ice_hadoop_cat',
|
|
'iceberg.table_identifier'='org.db.tbl');
|
|
DESCRIBE FORMATTED iceberg_hadoop_catalogs_with_id;
|
|
---- RESULTS: VERIFY_IS_SUBSET
|
|
'Location: ','$NAMENODE/test-warehouse/ice_hadoop_cat/org/db/tbl','NULL'
|
|
'','write.format.default','parquet '
|
|
'','iceberg.catalog ','ice_hadoop_cat '
|
|
'','iceberg.table_identifier','org.db.tbl '
|
|
'','name ','org.db.tbl '
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
INSERT INTO iceberg_hadoop_catalogs_with_id values ('ice', 3.14);
|
|
SELECT * from iceberg_hadoop_catalogs_with_id;
|
|
---- RESULTS
|
|
'ice',3.14
|
|
---- TYPES
|
|
STRING,DECIMAL
|
|
====
|
|
---- QUERY
|
|
SHOW FILES IN iceberg_hadoop_catalogs_with_id;
|
|
---- RESULTS
|
|
row_regex:'$NAMENODE/test-warehouse/ice_hadoop_cat/org/db/tbl/data/label=ice/.*.0.parq','.*',''
|
|
---- TYPES
|
|
STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
CREATE EXTERNAL TABLE iceberg_hadoop_cat_with_id_ext
|
|
STORED AS ICEBERG
|
|
TBLPROPERTIES('iceberg.catalog'='ice_hadoop_cat',
|
|
'iceberg.table_identifier'='org.db.tbl');
|
|
---- RESULTS
|
|
'Table has been created.'
|
|
====
|
|
---- QUERY
|
|
DESCRIBE FORMATTED iceberg_hadoop_cat_with_id_ext;
|
|
---- RESULTS: VERIFY_IS_SUBSET
|
|
'Location: ','$NAMENODE/test-warehouse/ice_hadoop_cat/org/db/tbl','NULL'
|
|
'','write.format.default','parquet '
|
|
'','iceberg.catalog ','ice_hadoop_cat '
|
|
'','iceberg.table_identifier','org.db.tbl '
|
|
'','name ','org.db.tbl '
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
SELECT * FROM iceberg_hadoop_cat_with_id_ext;
|
|
---- RESULTS
|
|
'ice',3.14
|
|
---- TYPES
|
|
STRING,DECIMAL
|
|
====
|
|
---- QUERY
|
|
DROP TABLE iceberg_hadoop_cat_with_id_ext;
|
|
---- RESULTS
|
|
'Table has been dropped.'
|
|
====
|
|
---- QUERY
|
|
REFRESH iceberg_hadoop_catalogs_with_id;
|
|
SELECT * FROM iceberg_hadoop_catalogs_with_id;
|
|
---- RESULTS
|
|
'ice',3.14
|
|
---- TYPES
|
|
STRING,DECIMAL
|
|
====
|
|
---- QUERY
|
|
CREATE TABLE iceberg_hive_catalogs(
|
|
label STRING,
|
|
val decimal(10,2)
|
|
)
|
|
PARTITIONED BY SPEC(label)
|
|
STORED AS ICEBERG
|
|
TBLPROPERTIES('iceberg.catalog'='ice_hive_cat');
|
|
====
|
|
---- QUERY
|
|
DESCRIBE FORMATTED iceberg_hive_catalogs;
|
|
---- RESULTS: VERIFY_IS_SUBSET
|
|
'Location: ','$NAMENODE/test-warehouse/$DATABASE.db/iceberg_hive_catalogs','NULL'
|
|
'','write.format.default','parquet '
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
INSERT INTO iceberg_hive_catalogs values ('ice', 3.14);
|
|
SELECT * from iceberg_hive_catalogs;
|
|
---- RESULTS
|
|
'ice',3.14
|
|
---- TYPES
|
|
STRING,DECIMAL
|
|
====
|
|
---- QUERY
|
|
SHOW FILES IN iceberg_hive_catalogs;
|
|
---- RESULTS
|
|
row_regex:'$NAMENODE/test-warehouse/$DATABASE.db/iceberg_hive_catalogs/data/label=ice/.*.0.parq','.*',''
|
|
---- TYPES
|
|
STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
CREATE EXTERNAL TABLE iceberg_hive_catalogs_ext
|
|
STORED AS ICEBERG
|
|
TBLPROPERTIES('iceberg.catalog'='ice_hive_cat',
|
|
'iceberg.table_identifier'='$DATABASE.iceberg_hive_catalogs');
|
|
---- RESULTS
|
|
'Table has been created.'
|
|
====
|
|
---- QUERY
|
|
DESCRIBE FORMATTED iceberg_hive_catalogs_ext;
|
|
---- RESULTS: VERIFY_IS_SUBSET
|
|
'Location: ','$NAMENODE/test-warehouse/$DATABASE.db/iceberg_hive_catalogs','NULL'
|
|
'','write.format.default','parquet '
|
|
'','iceberg.table_identifier','$DATABASE.iceberg_hive_catalogs'
|
|
'','name ','$DATABASE.iceberg_hive_catalogs'
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
SELECT * FROM iceberg_hive_catalogs_ext;
|
|
---- RESULTS
|
|
'ice',3.14
|
|
---- TYPES
|
|
STRING,DECIMAL
|
|
====
|
|
---- QUERY
|
|
DROP TABLE iceberg_hive_catalogs_ext;
|
|
---- RESULTS
|
|
'Table has been dropped.'
|
|
====
|
|
---- QUERY
|
|
REFRESH iceberg_hive_catalogs;
|
|
SELECT * FROM iceberg_hive_catalogs;
|
|
---- RESULTS
|
|
'ice',3.14
|
|
---- TYPES
|
|
STRING,DECIMAL
|
|
====
|