Skip to content

Commit

Permalink
Merge pull request awslabs#443 from mohdaliiqbal/autodistfix
Browse files Browse the repository at this point in the history
v_extended_table_info - adding AUTO(ALL) and AUTO(EVEN) values to size column CASE clause
  • Loading branch information
IanMeyers authored May 13, 2019
2 parents 4646dac + 226be72 commit fe4325d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/AdminViews/v_extended_table_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ SELECT ti.database,
ti.size || '/' || CASE
WHEN stp.sum_r = stp.sum_sr OR stp.sum_sr = 0 THEN
CASE
WHEN "diststyle" = 'EVEN' THEN (stp.pop_slices*(colenc.cols + 3))
WHEN ("diststyle" = 'EVEN' OR "diststyle"='AUTO(EVEN)') THEN (stp.pop_slices*(colenc.cols + 3))
WHEN SUBSTRING("diststyle",1,3) = 'KEY' THEN (stp.pop_slices*(colenc.cols + 3))
WHEN "diststyle" = 'ALL' THEN (cluster_info.node_count*(colenc.cols + 3))
END
WHEN ("diststyle" = 'ALL' OR "diststyle"='AUTO(ALL)') THEN (cluster_info.node_count*(colenc.cols + 3))
END
ELSE
CASE
WHEN "diststyle" = 'EVEN' THEN (stp.pop_slices*(colenc.cols + 3)*2)
WHEN ( "diststyle" = 'EVEN' OR "diststyle"='AUTO(EVEN)') THEN (stp.pop_slices*(colenc.cols + 3)*2)
WHEN SUBSTRING("diststyle",1,3) = 'KEY' THEN (stp.pop_slices*(colenc.cols + 3)*2)
WHEN "diststyle" = 'ALL' THEN (cluster_info.node_count*(colenc.cols + 3)*2)
END
WHEN ( "diststyle" = 'ALL' OR "diststyle"='AUTO(ALL)') THEN (cluster_info.node_count*(colenc.cols + 3)*2)
END
END|| ' (' || ti.pct_used || ')' AS size,
ti.tbl_rows,
ti.unsorted,
Expand Down

0 comments on commit fe4325d

Please sign in to comment.