title: INT32 type error when scanning parquet federated table. Bug or Expected behavior?
body: <p>I am using BigQuery to query an external data source (also known as a federated table), where the source data is a hive-partitioned parquet table stored in google cloud storage.  I used <a href="https://www.youtube.com/watch?v=l5I0knEcH4I&amp;t=99s" rel="nofollow noreferrer">this guide</a> to define the table.</p>
  
  <p>My first query to test this table looks like the following</p>
  
  <pre><code>SELECT * FROM my_dataset.my_table WHERE year=2019 AND day = "2019-01-01" LIMIT 10
  </code></pre>
  
  <p>This query fails with the following error</p>
  
  <blockquote>
    <p>Column visitor_partition has type INT64, which differs from the expected type of INT32</p>
  </blockquote>
  
  <p>I want to know why this error occurs and how to work around it or solve it.  I have performed a bit of investigation using the <code>parquet-tools</code> library to peek inside the internals of my parquet data.</p>
  
  <p>When I run <code>java -jar ./parquet-tools-1.10.0.jar meta test.c000.gz.parquet | grep visitor_partition</code> over one of my parquet files, the following relevant lines are returned</p>
  
  <pre><code>visitor_partition:          OPTIONAL INT64 R:0 D:1
  visitor_partition:           INT64 GZIP DO:0 FPO:59420041 SZ:54561/537912/9.86 VC:633590 ENC:BIT_PACKED,PLAIN_DICTIONARY,RLE ST:[min: 0, max: 99, num_nulls: 0]
  </code></pre>
  
  <p>When I run the schema, command, the following relevant schema info comes up <code>optional int64 visitor_partition;</code></p>
  
  <p>So its clear that in this parquet file, the data for the <code>visitor_partition</code> field is represented as an INT64.  So why does BigQuery expect to see an INT32 type here?</p>