title: How does parquet determine which encoding to use?
body: <p><strong>Context:</strong></p>
  
  <ul>
  <li>I have two identical datasets (say Left and Right) with 112 parquet files in each dataset. </li>
  <li>These parquet files were created using Hive, by converting delimited flat files. </li>
  <li>The process used to create the delimited flat files files is slightly different between left and right processes.</li>
  <li>I noticed a significant size difference between both datasets, even though the content in them is exactly the same. Left dataset is 400GB and Right dataset is 420GB.</li>
  <li>When I checked the Parquet schema using parquet-tools, I noticed different encoding was used for left and right datasets as shown (for one column) below:</li>
  </ul>
  
  <p><strong>Left:</strong></p>
  
  <pre><code>column_a:  INT64 SNAPPY DO:0 FPO:4 SZ:5179987/6161135/1.19 VC:770100 ENC:PLAIN,RLE,BIT_PACKED
  </code></pre>
  
  <p><strong>Right:</strong></p>
  
  <pre><code>column_a:  INT64 SNAPPY DO:0 FPO:4 SZ:3040269/5671813/1.87 VC:782499 ENC:BIT_PACKED,PLAIN,RLE,PLAIN_DICTIONARY
  </code></pre>
  
  <p><strong>My Question:</strong></p>
  
  <p>How does parquet determine what encoding type to use and what could have made parquet choose different encoding? Is it something we can control using a Hive / Spark config?</p>