@@ -60,10 +60,6 @@ impl TimeDimensionSymbol {
6060 self . alias_suffix . clone ( )
6161 }
6262
63- pub fn get_dependencies ( & self ) -> Vec < Rc < MemberSymbol > > {
64- self . base_symbol . get_dependencies ( )
65- }
66-
6763 pub fn owned_by_cube ( & self ) -> bool {
6864 self . base_symbol . owned_by_cube ( )
6965 }
@@ -94,8 +90,28 @@ impl TimeDimensionSymbol {
9490 . collect ( )
9591 }
9692
93+ pub fn get_dependencies ( & self ) -> Vec < Rc < MemberSymbol > > {
94+ let mut deps = vec ! [ ] ;
95+ if let Some ( granularity_obj) = & self . granularity_obj {
96+ if let Some ( calendar_sql) = granularity_obj. calendar_sql ( ) {
97+ calendar_sql. extract_symbol_deps ( & mut deps) ;
98+ }
99+ }
100+
101+ deps. append ( & mut self . base_symbol . get_dependencies ( ) ) ;
102+ deps
103+ }
104+
97105 pub fn get_dependencies_with_path ( & self ) -> Vec < ( Rc < MemberSymbol > , Vec < String > ) > {
98- self . base_symbol . get_dependencies_with_path ( )
106+ let mut deps = vec ! [ ] ;
107+ if let Some ( granularity_obj) = & self . granularity_obj {
108+ if let Some ( calendar_sql) = granularity_obj. calendar_sql ( ) {
109+ calendar_sql. extract_symbol_deps_with_path ( & mut deps) ;
110+ }
111+ }
112+
113+ deps. append ( & mut self . base_symbol . get_dependencies_with_path ( ) ) ;
114+ deps
99115 }
100116
101117 pub fn cube_name ( & self ) -> String {
@@ -107,6 +123,12 @@ impl TimeDimensionSymbol {
107123 }
108124
109125 pub fn is_reference ( & self ) -> bool {
126+ if let Some ( granularity_obj) = & self . granularity_obj {
127+ if granularity_obj. calendar_sql ( ) . is_some ( ) {
128+ return false ;
129+ }
130+ }
131+
110132 self . base_symbol . is_reference ( )
111133 }
112134
0 commit comments