2727import org .apache .druid .data .input .impl .StringDimensionSchema ;
2828import org .apache .druid .data .input .impl .TimestampSpec ;
2929import org .apache .druid .iceberg .filter .IcebergEqualsFilter ;
30+ import org .apache .druid .java .util .common .DateTimes ;
3031import org .apache .druid .java .util .common .FileUtils ;
3132import org .apache .druid .java .util .common .parsers .CloseableIterator ;
3233import org .apache .iceberg .DataFile ;
@@ -106,7 +107,12 @@ public void testBasicRead() throws IOException
106107 writeRows (table , row (1_000L , "alice" , 1.1 ), row (2_000L , "bob" , 2.2 ), row (3_000L , "carol" , 3.3 ));
107108
108109 final IcebergArrowInputSourceReader reader = new IcebergArrowInputSourceReader (
109- table , null , null , true , INPUT_SCHEMA , IcebergArrowInputSourceReader .DEFAULT_BATCH_SIZE
110+ table ,
111+ null ,
112+ null ,
113+ true ,
114+ INPUT_SCHEMA ,
115+ IcebergArrowInputSourceReader .DEFAULT_BATCH_SIZE
110116 );
111117
112118 final List <InputRow > rows = readAll (reader );
@@ -126,7 +132,12 @@ public void testEmptyTable() throws IOException
126132 final Table table = catalog .retrieveTable (NAMESPACE , TABLE );
127133
128134 final IcebergArrowInputSourceReader reader = new IcebergArrowInputSourceReader (
129- table , null , null , true , INPUT_SCHEMA , IcebergArrowInputSourceReader .DEFAULT_BATCH_SIZE
135+ table ,
136+ null ,
137+ null ,
138+ true ,
139+ INPUT_SCHEMA ,
140+ IcebergArrowInputSourceReader .DEFAULT_BATCH_SIZE
130141 );
131142
132143 final List <InputRow > rows = readAll (reader );
@@ -175,7 +186,12 @@ public void testColumnPruning() throws IOException
175186 );
176187
177188 final IcebergArrowInputSourceReader reader = new IcebergArrowInputSourceReader (
178- table , null , null , true , pruned , IcebergArrowInputSourceReader .DEFAULT_BATCH_SIZE
189+ table ,
190+ null ,
191+ null ,
192+ true ,
193+ pruned ,
194+ IcebergArrowInputSourceReader .DEFAULT_BATCH_SIZE
179195 );
180196
181197 final List <InputRow > rows = readAll (reader );
@@ -196,29 +212,34 @@ public void testLargeBatch() throws IOException
196212 writeRows (table , data );
197213
198214 final IcebergArrowInputSourceReader reader = new IcebergArrowInputSourceReader (
199- table , null , null , true , INPUT_SCHEMA , IcebergArrowInputSourceReader .DEFAULT_BATCH_SIZE
215+ table ,
216+ null ,
217+ null ,
218+ true ,
219+ INPUT_SCHEMA ,
220+ IcebergArrowInputSourceReader .DEFAULT_BATCH_SIZE
200221 );
201222
202223 final List <InputRow > rows = readAll (reader );
203224 Assert .assertEquals (count , rows .size ());
204225 }
205226
206227 @ Test
207- public void testSnapshotTime () throws IOException
228+ public void testSnapshotTime () throws IOException , InterruptedException
208229 {
209230 final Table table = catalog .retrieveCatalog ().createTable (tableId , SCHEMA );
210231 writeRows (table , row (1_000L , "snap1" , 1.0 ));
211232 final long afterFirstSnapshot = System .currentTimeMillis ();
212233
213234 // Small sleep to ensure second snapshot has later timestamp
214- try { Thread .sleep (10 ); } catch ( InterruptedException ignored ) { }
235+ Thread .sleep (10 );
215236 writeRows (table , row (2_000L , "snap2" , 2.0 ));
216237
217238 // Read as-of the first snapshot — should only see 1 row.
218239 final IcebergArrowInputSourceReader reader = new IcebergArrowInputSourceReader (
219240 table ,
220241 null ,
221- new org . joda . time . DateTime (afterFirstSnapshot ),
242+ DateTimes . utc (afterFirstSnapshot ),
222243 true ,
223244 INPUT_SCHEMA ,
224245 IcebergArrowInputSourceReader .DEFAULT_BATCH_SIZE
@@ -277,9 +298,14 @@ private static List<InputRow> readAll(final IcebergArrowInputSourceReader reader
277298 private static final class NoopInputStats implements org .apache .druid .data .input .InputStats
278299 {
279300 @ Override
280- public void incrementProcessedBytes (final long v ) {}
301+ public void incrementProcessedBytes (final long v )
302+ {
303+ }
281304
282305 @ Override
283- public long getProcessedBytes () { return 0 ; }
306+ public long getProcessedBytes ()
307+ {
308+ return 0 ;
309+ }
284310 }
285311}
0 commit comments