Function export_objects does not show correct segmentation clause
Even if MODULARHASH function is used in segmentation clause when creating the table, the DDL generated by export_objects show HASH function instead of MODULARHASH.
To replicate this issue,
Thanks,
Rupendra
To replicate this issue,
create table t2 (col1 varchar(10)) order by col1 segmented by MODULARHASH(col1) all nodes;
select export_objects('','t2'); The result I got was-
CREATE TABLE public.t2(Is this a problem with export_objects function or default behavior of Vertica? Is there any other way to verify that the projections are created with MODULARHASH segmentation instead of HASH segmentation?
col1 varchar(10)
);
CREATE PROJECTION public.t2 /*+createtype(P)*/
(
col1
)
AS
SELECT t2.col1
FROM public.t2
ORDER BY t2.col1
SEGMENTED BY hash(t2.col1) ALL NODES KSAFE 1;
SELECT MARK_DESIGN_KSAFE(1);
Thanks,
Rupendra
0
Comments
There shouldn't be a significant difference between modularhash and hash, so if you want it to be consistent, you can just stick with hash instead.
https://my.vertica.com/docs/6.1.x/HTML/index.htm#9171.htm
It says -"An elastic projection (a segmented projection created when Elastic Cluster is enabled) created with a modularhash segmentation expression uses hash instead".
Since elastic cluster is enabled in our case, we will use HASH instead of MODULARHASH.