File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -106,3 +106,36 @@ func TestCommitFilesIndexIterClosed(t *testing.T) {
106
106
func TestCommitFilesIterClosed (t * testing.T ) {
107
107
testTableIterClosed (t , new (commitFilesTable ))
108
108
}
109
+
110
+ func TestPartitionRowsWithIndex (t * testing.T ) {
111
+
112
+ t .Helper ()
113
+ require := require .New (t )
114
+ ctx , _ , cleanup := setup (t )
115
+ defer cleanup ()
116
+
117
+ table := new (commitFilesTable )
118
+ expected , err := tableToRows (ctx , table )
119
+ require .NoError (err )
120
+
121
+ lookup := tableIndexLookup (t , table , ctx )
122
+ tbl := table .WithIndexLookup (lookup )
123
+
124
+ pit , err := tbl .Partitions (ctx )
125
+ require .NoError (err )
126
+
127
+ i := 0
128
+ for p , e := pit .Next (); e != io .EOF ; p , e = pit .Next () {
129
+ require .NoError (e )
130
+
131
+ rit , err := tbl .PartitionRows (ctx , p )
132
+ require .NoError (err )
133
+
134
+ for r , e := rit .Next (); e != io .EOF ; r , e = rit .Next () {
135
+ require .NoError (e )
136
+
137
+ require .ElementsMatch (expected [i ], r )
138
+ i ++
139
+ }
140
+ }
141
+ }
You can’t perform that action at this time.
0 commit comments