Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-13339

Introduce the COPY TESTCASE statements

    XMLWordPrintableJSON

Details

    • Documentation
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Docs
    • None
    • ghx-label-6

    Description

      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:

      COPY TESTCASE TO <hdfs/s3 dirpath> <query stmt>

      Example:

      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 |
      +--------------------------------------------------------------------------------------+

      Statement to load the metadata in a target cluster:

      COPY TESTCASE FROM <hdfs/s3 testcase file path>

      Example:

      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                                                                      |
      +----------------------------------------------------------------------------------------------------------------+

      To use the metadata, set query option PLANNER_TESTCASE_MODE to true:

      SET PLANNER_TESTCASE_MODE=true;
      SHOW COLUMN STATS functional_parquet.alltypes;

      Attachments

        Issue Links

          Activity

            People

              msanjana19 Sanjana Malhotra
              stigahuang Quanlong Huang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: