@@ -24,7 +24,7 @@ use std::{
24
24
25
25
use async_trait:: async_trait;
26
26
use bytes:: Bytes ;
27
- use datafusion:: arrow:: datatypes:: Schema ;
27
+ use datafusion:: { arrow:: datatypes:: Schema , prelude :: col } ;
28
28
use datafusion:: {
29
29
datasource:: {
30
30
file_format:: parquet:: ParquetFormat ,
@@ -39,7 +39,10 @@ use relative_path::RelativePath;
39
39
use tokio:: fs:: { self , DirEntry } ;
40
40
use tokio_stream:: wrappers:: ReadDirStream ;
41
41
42
- use crate :: metrics:: storage:: { localfs:: REQUEST_RESPONSE_TIME , StorageMetrics } ;
42
+ use crate :: {
43
+ event:: DEFAULT_TIMESTAMP_KEY ,
44
+ metrics:: storage:: { localfs:: REQUEST_RESPONSE_TIME , StorageMetrics } ,
45
+ } ;
43
46
use crate :: { option:: validation, utils:: validate_path_is_writeable} ;
44
47
45
48
use super :: { object_storage, LogStream , ObjectStorage , ObjectStorageError , ObjectStorageProvider } ;
@@ -222,12 +225,12 @@ impl ObjectStorage for LocalFS {
222
225
let file_format = ParquetFormat :: default ( ) . with_enable_pruning ( Some ( true ) ) ;
223
226
let listing_options = ListingOptions {
224
227
file_extension : ".parquet" . to_string ( ) ,
225
- file_sort_order : Vec :: new ( ) ,
228
+ file_sort_order : vec ! [ vec! [ col ( DEFAULT_TIMESTAMP_KEY ) . sort ( true , false ) ] ] ,
226
229
infinite_source : false ,
227
230
format : Arc :: new ( file_format) ,
228
231
table_partition_cols : vec ! [ ] ,
229
232
collect_stat : true ,
230
- target_partitions : 1 ,
233
+ target_partitions : 32 ,
231
234
} ;
232
235
233
236
let config = ListingTableConfig :: new_with_multi_paths ( prefixes)
0 commit comments