@@ -263,6 +263,7 @@ def find_partitions(url, fs):
263263 # inner month partitions).
264264
265265 partitions = []
266+ partitions_time_attributes = []
266267
267268 def _is_private (path ):
268269 _ , tail = os .path .split (path )
@@ -284,15 +285,14 @@ def find_partition_helper(url, fs, partitions):
284285 partitions .append (part [0 ])
285286 find_partition_helper (inner_dir , fs , partitions )
286287
287- if fs .isfile (url ):
288- return partitions
289- find_partition_helper (url , fs , partitions )
288+ if not fs .isfile (url ):
289+ find_partition_helper (url , fs , partitions )
290290
291- legal_time_units = ["year" , "month" , "day" , "hour" , "minute" , "second" ]
291+ legal_time_units = ["year" , "month" , "day" , "hour" , "minute" , "second" ]
292292
293- partitions_time_attributes = [j for j in legal_time_units if j in partitions ]
293+ partitions_time_attributes = [j for j in legal_time_units if j in partitions ]
294294
295- return partitions_time_attributes
295+ return partitions_time_attributes , partitions
296296
297297
298298def find_filters (partitions_time_attributes , start , end , filters , filter_column ):
0 commit comments