Xianbao QIAN commited on
Commit
3312f9f
·
1 Parent(s): 101d805

order by number of children in the parquet file

Browse files
Files changed (1) hide show
  1. python/2_ancestors.py +1 -0
python/2_ancestors.py CHANGED
@@ -112,6 +112,7 @@ final_output_query = """
112
  ac.all_children
113
  FROM ancestor_children ac
114
  LEFT JOIN direct_children_mapping dcm ON ac.ancestor = dcm.parent
 
115
  ) TO 'tables/ancestor_children.parquet' (FORMAT 'parquet')
116
  """
117
  con.execute(final_output_query)
 
112
  ac.all_children
113
  FROM ancestor_children ac
114
  LEFT JOIN direct_children_mapping dcm ON ac.ancestor = dcm.parent
115
+ ORDER BY array_length(ac.all_children) DESC
116
  ) TO 'tables/ancestor_children.parquet' (FORMAT 'parquet')
117
  """
118
  con.execute(final_output_query)