@@ -40,7 +40,7 @@ use datafusion::{
4040use indexmap:: IndexMap ;
4141use parking_lot:: RwLock ;
4242
43- type ObservabilityData = Arc < RwLock < IndexMap < String , HashMap < String , ScalarValue > > > > ;
43+ type IndexMapData = Arc < RwLock < IndexMap < String , HashMap < String , ScalarValue > > > > ;
4444
4545#[ derive( Debug ) ]
4646pub struct IndexMapTableConfig {
@@ -54,7 +54,7 @@ pub struct IndexMapTable {
5454 schema : Arc < Schema > ,
5555 constraints : Option < Constraints > ,
5656 config : IndexMapTableConfig ,
57- inner : ObservabilityData ,
57+ inner : IndexMapData ,
5858}
5959
6060impl IndexMapTable {
@@ -72,7 +72,17 @@ impl IndexMapTable {
7272 } )
7373 }
7474
75- fn partitions ( & self ) -> & [ Vec < RecordBatch > ] { }
75+ fn hashmap_to_row ( & self , values : & HashMap < String , ScalarValue > ) { }
76+
77+ fn partitions ( & self ) -> Vec < Vec < RecordBatch > > {
78+ let guard = self . inner . read ( ) ;
79+ let values = guard. values ( ) ;
80+ let mut batches = Vec :: new ( ) ;
81+ for value in values {
82+ let row = self . hashmap_to_row ( value) ?;
83+ }
84+ batches
85+ }
7686}
7787
7888#[ async_trait]
@@ -97,8 +107,8 @@ impl TableProvider for IndexMapTable {
97107 & self ,
98108 state : & dyn Session ,
99109 projection : Option < & Vec < usize > > ,
100- filters : & [ Expr ] ,
101- limit : Option < usize > ,
110+ _filters : & [ Expr ] ,
111+ _limit : Option < usize > ,
102112 ) -> Result < Arc < dyn ExecutionPlan > > {
103113 let partitions = self . partitions ( ) ;
104114 let exec =
0 commit comments