Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
[TRAFODION-2537] Add file_desc to salted secondary indexes indexes_desc
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveBirdsall committed Mar 15, 2017
1 parent 2ba737c commit e5e1356
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 199 deletions.
8 changes: 8 additions & 0 deletions core/sql/generator/Generator.cpp
Expand Up @@ -2206,6 +2206,14 @@ TrafDesc * Generator::createVirtualTableDesc
curr_index_desc->indexesDesc()->hbaseCreateOptions = NULL;
curr_index_desc->indexesDesc()->numSaltPartns =
indexInfo[i].numSaltPartns;
if (curr_index_desc->indexesDesc()->numSaltPartns > 0)
{
// the presence of the files descriptor tells createNAFileSets
// that the index is salted like the base table
TrafDesc * ci_files_desc = TrafAllocateDDLdesc(DESC_FILES_TYPE, space);
ci_files_desc->filesDesc()->setAudited(TRUE); // audited table
curr_index_desc->indexesDesc()->files_desc = ci_files_desc;
}
curr_index_desc->indexesDesc()->setRowFormat(indexInfo[i].rowFormat);
if (indexInfo[i].hbaseCreateOptions)
{
Expand Down
18 changes: 8 additions & 10 deletions core/sql/regress/hive/EXPECTED017
Expand Up @@ -940,11 +940,10 @@ _SALT_@ B@ A
LC RC OP OPERATOR OPT DESCRIPTION CARD
---- ---- ---- -------------------- -------- -------------------- ---------

5 . 6 root 1.00E+002
4 . 5 esp_exchange 1:2(range) 1.00E+002
2 3 4 tuple_flow 1.00E+002
. . 3 trafodion_load_prepa T017TTCIDXB 1.00E+000
1 . 2 esp_exchange 2(range):1 (m) 1.00E+002
4 . 5 root 1.00E+002
3 . 4 esp_exchange 1:2(range) 1.00E+002
1 2 3 tuple_flow 1.00E+002
. . 2 trafodion_load_prepa T017TTCIDXB 1.00E+000
. . 1 trafodion_index_scan T017TTCIDXB 1.00E+002

--- SQL operation complete.
Expand All @@ -954,11 +953,10 @@ LC RC OP OPERATOR OPT DESCRIPTION CARD
LC RC OP OPERATOR OPT DESCRIPTION CARD
---- ---- ---- -------------------- -------- -------------------- ---------

5 . 6 root 1.00E+002
4 . 5 esp_exchange 1:2(range) 1.00E+002
2 3 4 tuple_flow 1.00E+002
. . 3 trafodion_load_prepa T017TTCIDXB 1.00E+000
1 . 2 esp_exchange 2(range):1 (m) 1.00E+002
4 . 5 root 1.00E+002
3 . 4 esp_exchange 1:2(range) 1.00E+002
1 2 3 tuple_flow 1.00E+002
. . 2 trafodion_load_prepa T017TTCIDXB 1.00E+000
. . 1 trafodion_index_scan T017TTCIDXB 1.00E+002

--- SQL operation complete.
Expand Down

0 comments on commit e5e1356

Please sign in to comment.