Skip to main content

Vertica NULL values issues ! Maybe BUG

  • May 4, 2016
  • 1 reply
  • 7 views

Adrian_Oprea_1
Forum|alt.badge.img+1

 Since last upgrade to 7.2.2 we have faced some issues with NULL values processing. 

 

This happens when we build temp table based on CTE and NULL values are involved.

 

I can replicate the strange behaviour as below : 

 

CTE working fine:

With 
A as ( select Name as Name from db.DimPmaster limit 4 ),
B as ( select NULL as Name )
select a.Name from a, b;
Name
-------------------
AAAA
BBBBB
CCCCCC
DDDDDD

With
A as ( select Name as Name from db.DimPmaster limit 4 ),
B as ( select '' as Name )
select a.Name from a, b;
Name
-------------------
AAAA
BBBBB
CCCCCC
DDDDDD

 -- everything works fine when i run my CTE tests. 

 

Now i want to put this into a temp table.

DROP TABLE IF EXISTS t1; 
CREATE LOCAL TEMP TABLE T1 ON COMMIT PRESERVE ROWS AS
With
A as ( select brandName as name from db.DimPmaster limit 4),
B as ( select NULL as name )
select a.name from a, b;
select * from T1;
Name
-----------










- i get no data in my temporary table !!! - THIS IS NOT GOOD !!! -- IS THIS A BUG ?  

 

DROP TABLE IF EXISTS T2;
CREATE LOCAL TEMP TABLE T2 ON COMMIT PRESERVE ROWS AS
With
A as ( select brandName as name from db.DimPmaster limit 4),
B as ( select '' as name )
select a.name from a, b;
SELECT * from T2;
Name
-------------------
AAAA
BBBBB
CCCCCC
DDDDDD

- I GET DATA IN MY TEMP TABLE !??? 

 

 

Thanks 

1 reply

Adrian_Oprea_1
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • May 5, 2016

 Hi all,

 

Vertica support confirmed this is BUG (VER-45807) has been fixed in version 7.2.2-3 and they will release it soon.

 

 Thx