[
https://issues.apache.org/jira/browse/IMPALA-13339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sanjana Malhotra resolved IMPALA-13339.
---------------------------------------
Resolution: Fixed
> Introduce the COPY TESTCASE statements
> --------------------------------------
>
> Key: IMPALA-13339
> URL: https://issues.apache.org/jira/browse/IMPALA-13339
> Project: IMPALA
> Issue Type: Documentation
> Components: Docs
> Reporter: Quanlong Huang
> Assignee: Sanjana Malhotra
> Priority: Major
>
> COPY TESTCASE statements are used to dump metadata of tables/views used by a
> query into a file. Users can share the file and developers replay the
> metadata in their local cluster.
> Statement to dump the metadata to a file:
> {noformat}
> COPY TESTCASE TO <hdfs/s3 dirpath> <query stmt>{noformat}
> Example:
> {noformat}
> COPY TESTCASE TO '/tmp' SELECT * FROM functional_parquet.alltypes;
> +--------------------------------------------------------------------------------------+
> | Test case data output path
> |
> +--------------------------------------------------------------------------------------+
> |
> hdfs://localhost:20500/tmp/impala-testcase-data-f41f7b14-dfc8-408b-ac3b-ef49fc3e0a83
> |
> +--------------------------------------------------------------------------------------+{noformat}
> Statement to load the metadata in a target cluster:
> {noformat}
> COPY TESTCASE FROM <hdfs/s3 testcase file path>{noformat}
> Example:
> {noformat}
> COPY TESTCASE FROM
> '/tmp/impala-testcase-data-f41f7b14-dfc8-408b-ac3b-ef49fc3e0a83';
> +----------------------------------------------------------------------------------------------------------------+
> | summary
> |
> +----------------------------------------------------------------------------------------------------------------+
> | Testcase generated using Impala version 4.5.0-SNAPSHOT. 1 db(s), 1 table(s)
> and 0 view(s) imported for query: |
> |
> |
> | SELECT * FROM functional_parquet.alltypes
> |
> +----------------------------------------------------------------------------------------------------------------+{noformat}
> To use the metadata, set query option PLANNER_TESTCASE_MODE to true:
> {noformat}
> SET PLANNER_TESTCASE_MODE=true;
> SHOW COLUMN STATS functional_parquet.alltypes;{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]