File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
rust/cubesql/cubesql/src/transport Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -79,17 +79,15 @@ impl MetaContext {
7979 & self ,
8080 alias_to_cube : & Vec < ( String , String ) > ,
8181 ) -> Option < Arc < dyn SqlGenerator + Send + Sync > > {
82- let data_sources = alias_to_cube
82+ let data_source = alias_to_cube
8383 . iter ( )
8484 . map ( |( _, c) | self . cube_to_data_source . get ( c) )
85- . unique ( )
86- . collect :: < Option < Vec < _ > > > ( ) ?;
87- if data_sources. len ( ) != 1 {
88- return None ;
89- }
90- self . data_source_to_sql_generator
91- . get ( data_sources[ 0 ] . as_str ( ) )
92- . cloned ( )
85+ . all_equal_value ( ) ;
86+
87+ // Don't care for non-equal data sources, nor for missing cube_to_data_source keys
88+ let data_source = data_source. ok ( ) ??;
89+
90+ self . data_source_to_sql_generator . get ( data_source) . cloned ( )
9391 }
9492
9593 pub fn find_cube_with_name ( & self , name : & str ) -> Option < & CubeMeta > {
You can’t perform that action at this time.
0 commit comments