Commit 1ba3e6f 1 parent e4a96d0 commit 1ba3e6f Copy full SHA for 1ba3e6f
File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1
1
use std:: path:: Path ;
2
2
use std:: pin:: Pin ;
3
3
use std:: task:: { Context , Poll } ;
4
+ use std:: time:: Instant ;
4
5
5
6
use arrow_array:: StructArray as ArrowStructArray ;
6
7
use futures_util:: Stream ;
@@ -23,6 +24,8 @@ pub async fn exec_convert(input_path: impl AsRef<Path>) -> VortexResult<()> {
23
24
input_path. as_ref( ) . display( )
24
25
) ;
25
26
27
+ let wall_start = Instant :: now ( ) ;
28
+
26
29
let output_path = input_path. as_ref ( ) . with_extension ( "vortex" ) ;
27
30
let file = File :: open ( input_path) . await ?;
28
31
let mut reader = ParquetRecordBatchStreamBuilder :: new ( file) . await ?. build ( ) ?;
@@ -36,6 +39,12 @@ pub async fn exec_convert(input_path: impl AsRef<Path>) -> VortexResult<()> {
36
39
}
37
40
}
38
41
42
+ let read_complete = Instant :: now ( ) ;
43
+ println ! (
44
+ "Read Parquet file in {:?}" ,
45
+ read_complete. duration_since( wall_start)
46
+ ) ;
47
+
39
48
let dtype = chunks. first ( ) . vortex_expect ( "empty chunks" ) . dtype ( ) . clone ( ) ;
40
49
let chunked_array = ChunkedArray :: try_new ( chunks, dtype) ?;
41
50
@@ -55,6 +64,11 @@ pub async fn exec_convert(input_path: impl AsRef<Path>) -> VortexResult<()> {
55
64
let output_file = File :: create ( output_path) . await ?;
56
65
writer. write ( output_file, stream) . await ?;
57
66
67
+ println ! (
68
+ "Wrote Vortex in {:?}" ,
69
+ Instant :: now( ) . duration_since( read_complete)
70
+ ) ;
71
+
58
72
Ok ( ( ) )
59
73
}
60
74
You can’t perform that action at this time.
0 commit comments