File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
rust/cubesqlplanner/cubesqlplanner/src/planner/time_dimension Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -80,16 +80,22 @@ impl GranularityHelper {
8080
8181 pub fn granularity_from_interval ( interval : & Option < String > ) -> Option < String > {
8282 if let Some ( interval) = interval {
83- if interval. contains ( "day" ) {
83+ if interval. contains ( "second" ) {
84+ Some ( "second" . to_string ( ) )
85+ } else if interval. contains ( "minute" ) {
86+ Some ( "minute" . to_string ( ) )
87+ } else if interval. contains ( "hour" ) {
88+ Some ( "hour" . to_string ( ) )
89+ } else if interval. contains ( "day" ) {
90+ Some ( "day" . to_string ( ) )
91+ } else if interval. contains ( "week" ) {
8492 Some ( "day" . to_string ( ) )
8593 } else if interval. contains ( "month" ) {
8694 Some ( "month" . to_string ( ) )
95+ } else if interval. contains ( "quarter" ) {
96+ Some ( "month" . to_string ( ) )
8797 } else if interval. contains ( "year" ) {
8898 Some ( "year" . to_string ( ) )
89- } else if interval. contains ( "week" ) {
90- Some ( "week" . to_string ( ) )
91- } else if interval. contains ( "hour" ) {
92- Some ( "hour" . to_string ( ) )
9399 } else {
94100 None
95101 }
You can’t perform that action at this time.
0 commit comments