Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

HANA views implicit aggregation mechanism

$
0
0

Hi everyone,

I came across strange hana behavior that I'd like to understand.

While validating data in our model I was doing some check via SQL and I was surprised to see that there some aggregation going on behind the scenes.

 

We have a data model composed of calc. views, both graphical and script.

 

select marc_matnr from GRAPHICAL_VIEW where marc_matnr = '000000000001001000';

this returtns 1 record (aggregated from 61)

 

select marc_matnr from (select * from GRAPHICAL_VIEW) where marc_matnr = '000000000001001000' ;

this returns 61 records

 

select marc_matnr from SCRIPT_VIEW where marc_matnr = '000000000001001000';

this returtns 1 record (aggregated from 61)

 

This different  behavior between script and graphical is causing some headaches when using them in joins.

 

I think I do understand the pattern here but would like to know if this is expected behavior and what are the mechanics behind it.

 

Please can anyone help?

 

(we're running rev.84)

 

Thanks a lot, Milos.


Viewing all articles
Browse latest Browse all 6412

Trending Articles