gpreload.feature 10.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
@gpreload
Feature: gpreload feature to reload data based on columns to sort

    Scenario: gpreload with quicklz compression
        Given the database is running
        And the database "testdb" does not exist
        And database "testdb" exists
        And there is a "ao" table "ao_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "ao" partition table "ao_part_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "co" table "co_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "co" partition table "co_part_table_comp" with compression "quicklz" in "testdb" with data
        And all the data from "testdb" is saved for verification
        And all the compression data from "testdb" is saved for verification
        When the user runs "gpreload -t gppylib/test/behave/mgmt_utils/steps/data/gpreload_table_file1 -d testdb"
        Then gpreload should return a return code of 0
        And verify that the compression ratio of "public.ao_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.ao_part_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.co_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.co_part_table_comp" in "testdb" is good
        And verify that the data of tables in "testdb" is validated after reload

    Scenario: gpreload with zlib compression
        Given the database is running
        And the database "testdb" does not exist
        And database "testdb" exists
        And there is a "ao" table "ao_table_comp" with compression "zlib" in "testdb" with data
        And there is a "ao" partition table "ao_part_table_comp" with compression "zlib" in "testdb" with data
        And there is a "co" table "co_table_comp" with compression "zlib" in "testdb" with data
        And there is a "co" partition table "co_part_table_comp" with compression "zlib" in "testdb" with data
        And all the data from "testdb" is saved for verification
        And all the compression data from "testdb" is saved for verification
        When the user runs "gpreload -t gppylib/test/behave/mgmt_utils/steps/data/gpreload_table_file1 -d testdb"
        Then gpreload should return a return code of 0
        And verify that the compression ratio of "public.ao_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.ao_part_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.co_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.co_part_table_comp" in "testdb" is good
        And verify that the data of tables in "testdb" is validated after reload

    Scenario: gpreload with no compression
        Given the database is running
        And the database "testdb" does not exist
        And database "testdb" exists
        And there is a "ao" table "ao_table" with compression "None" in "testdb" with data
        And there is a "ao" partition table "ao_part_table" with compression "None" in "testdb" with data
        And there is a "co" table "co_table" with compression "None" in "testdb" with data
        And there is a "co" partition table "co_part_table" with compression "None" in "testdb" with data
        And there is a "heap" table "heap_table" with compression "None" in "testdb" with data
        And all the data from "testdb" is saved for verification
        And all the compression data from "testdb" is saved for verification
        When the user runs "gpreload -t gppylib/test/behave/mgmt_utils/steps/data/gpreload_table_file2 -d testdb"
        Then gpreload should return a return code of 0
        And verify that the compression ratio of "public.ao_table" in "testdb" is good
        And verify that the compression ratio of "public.ao_part_table" in "testdb" is good
        And verify that the compression ratio of "public.co_table" in "testdb" is good
        And verify that the compression ratio of "public.co_part_table" in "testdb" is good
        And verify that the data of tables in "testdb" is validated after reload

    Scenario: gpreload with quicklz compression with indexes
        Given the database is running
        And the database "testdb" does not exist
        And database "testdb" exists
        And there is a "ao" table "ao_index_table" with index "ao_index" compression "quicklz" in "testdb" with data
        And there is a "co" table "co_index_table" with index "co_index" compression "quicklz" in "testdb" with data
        And all the data from "testdb" is saved for verification
        And all the compression data from "testdb" is saved for verification
        When the user runs "gpreload -t gppylib/test/behave/mgmt_utils/steps/data/gpreload_table_file_index -d testdb -a"
        Then gpreload should return a return code of 0
        And gpreload should not print Table public.ao_table_index has indexes. This might slow down table reload. Do you still want to continue ? to stdout
        And gpreload should not print Table public.co_table_index has indexes. This might slow down table reload. Do you still want to continue ? to stdout
        And verify that the compression ratio of "public.ao_index_table" in "testdb" is good
        And verify that the compression ratio of "public.co_index_table" in "testdb" is good
        And verify that the data of tables in "testdb" is validated after reload

    Scenario: gpreload with invalid table files
        Given the database is running
        And the database "testdb" does not exist
        And database "testdb" exists
        And there is a "ao" table "ao_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "ao" partition table "ao_part_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "co" table "co_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "co" partition table "co_part_table_comp" with compression "quicklz" in "testdb" with data
        And all the data from "testdb" is saved for verification
        And all the compression data from "testdb" is saved for verification
        When the user runs "gpreload -t gppylib/test/behave/mgmt_utils/steps/data/gpreload_table_file_index -d testdb"
        Then gpreload should return a return code of 2
        And gpreload should print Table public.ao_index_table does not exist to stdout
        When the user runs "gpreload -t gppylib/test/behave/mgmt_utils/steps/data/gpreload_table_file_invalid_columns -d testdb"
        Then gpreload should return a return code of 2
        And gpreload should print Table public.ao_table_comp does not have column column10 to stdout
        When the user runs "gpreload -t gppylib/test/behave/mgmt_utils/steps/data/gpreload_table_file_invalid_sort_order -d testdb"
        Then gpreload should return a return code of 2
        And gpreload should print Line .* is not formatted correctly: Invalid sort order foo to stdout
        When the user runs "gpreload -t gppylib/test/behave/mgmt_utils/steps/data/gpreload_table_file_invalid -d testdb"
        Then gpreload should return a return code of 2
        And gpreload should print Line .* is not formatted correctly: Empty column to stdout
        And verify that the compression ratio of "public.ao_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.ao_part_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.co_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.co_part_table_comp" in "testdb" is good
        And verify that the data of tables in "testdb" is validated after reload

    Scenario: gpreload with quicklz compression on leaf partitions
        Given the database is running
        And the database "testdb" does not exist
        And database "testdb" exists
        And there is a "ao" table "ao_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "ao" partition table "ao_part_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "co" table "co_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "co" partition table "co_part_table_comp" with compression "quicklz" in "testdb" with data
        And all the data from "testdb" is saved for verification
        And all the compression data from "testdb" is saved for verification
        When the user runs "gpreload -t gppylib/test/behave/mgmt_utils/steps/data/gpreload_table_file_leaf_partitions -d testdb"
        Then gpreload should return a return code of 0
        And verify that the compression ratio of "public.ao_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.ao_part_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.co_table_comp" in "testdb" is good
        And verify that the compression ratio of "public.co_part_table_comp" in "testdb" is good
        And verify that the data of tables in "testdb" is validated after reload

    Scenario: gpreload with quicklz compression on mid level partitions
        Given the database is running
        And the database "testdb" does not exist
        And database "testdb" exists
        And there is a "ao" table "ao_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "ao" partition table "ao_part_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "co" table "co_table_comp" with compression "quicklz" in "testdb" with data
        And there is a "co" partition table "co_part_table_comp" with compression "quicklz" in "testdb" with data
        And all the data from "testdb" is saved for verification
        And all the compression data from "testdb" is saved for verification
        When the user runs "gpreload -t gppylib/test/behave/mgmt_utils/steps/data/gpreload_table_file_mid_partitions -d testdb"
        Then gpreload should return a return code of 2
        And gpreload should print Please specify only leaf partitions or parent table name to stdout