1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ use std:: cell:: RefCell ;
1516use std:: collections:: HashMap ;
1617use std:: fs;
1718use std:: path:: Path ;
18- use std:: cell:: RefCell ;
19- use std:: thread_local;
2019use std:: sync:: Arc ;
20+ use std:: thread_local;
2121
2222use databend_common_catalog:: BasicColumnStatistics ;
2323use databend_common_catalog:: TableStatistics ;
@@ -71,7 +71,6 @@ struct YamlColumnStatistics {
7171 null_count : Option < u64 > ,
7272}
7373
74-
7574type TableStatsMap = HashMap < String , YamlTableStatistics > ;
7675type ColumnStatsMap = HashMap < String , YamlColumnStatistics > ;
7776
@@ -115,7 +114,6 @@ async fn setup_tpcds_tables(ctx: &Arc<QueryContext>) -> Result<()> {
115114 Ok ( ( ) )
116115}
117116
118-
119117/// Convert a YAML test case to a TestCase
120118fn create_test_case ( yaml : YamlTestCase ) -> Result < TestCase > {
121119 // Store statistics data in thread-local storage
@@ -286,7 +284,7 @@ async fn test_tpcds_optimizer() -> Result<()> {
286284 let optimized_plan = optimize_plan ( & ctx, raw_plan) . await ?;
287285 let optimized_plan_str = optimized_plan. format_indent ( false ) ?;
288286 println ! ( "Optimized plan:\n {}" , optimized_plan_str) ;
289-
287+
290288 // Verify the optimized plan matches expected output
291289 let actual_optimized = optimized_plan_str. trim ( ) ;
292290 let expected_optimized = test. expected_plan . trim ( ) ;
@@ -311,4 +309,3 @@ async fn test_tpcds_optimizer() -> Result<()> {
311309
312310 Ok ( ( ) )
313311}
314-
0 commit comments