Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

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, 
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(
    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);
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?



Thanks,
Rupendra

Comments

  • I believe modularhash is incompatible with "elastic cluster". If you disable elastic cluster, then it should export your DDL with modularhash intact. Elastic cluster is a mechanism for cluster expansion. 

    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.

  • Thanks Curtis. I found the reference to this in Vertica documentation as well.
    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.


Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.