Bird
0
0

You try to read a Parquet file in Spark using this code:

medium📝 Debug Q14 of 15
Hadoop - Performance Tuning
You try to read a Parquet file in Spark using this code:
spark.read.format('parquet').load('/data/file.orc')

What is the main issue here?
AFile extension does not match format specified
BParquet format cannot read ORC files
CSpark cannot read Parquet files
DNo issue, code will run fine
Step-by-Step Solution
Solution:
  1. Step 1: Check the file format and extension

    The code tries to read a file with .orc extension using Parquet format.
  2. Step 2: Understand format compatibility

    Parquet reader cannot read ORC files because they have different internal structures.
  3. Final Answer:

    Parquet format cannot read ORC files -> Option B
  4. Quick Check:

    Parquet reader ≠ ORC file [OK]
Quick Trick: Parquet reader can't read ORC files [OK]
Common Mistakes:
  • Ignoring file extension mismatch
  • Assuming Spark auto-detects format
  • Thinking Parquet and ORC are interchangeable

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Hadoop Quizzes