Storage Formats, Partitioning, and Serialization Questions
Physical storage layout for analytics data. Covers columnar and row format internals and their trade-offs (Parquet row groups and column chunks, ORC stripes, Avro), serialization choices, compression codec and column-encoding selection, partitioning and clustering or bucketing strategy including partition-key choice and pruning, the small-file problem and compaction, file-size and row-group tuning, and open table formats (Iceberg, Delta Lake, Hudi) at the layout and metadata level: ACID commits, snapshots and time travel, manifest and metadata-tree structure, schema and partition evolution, and the catalog that tracks them. The scope is how data is laid out on disk and what that layout makes cheap or expensive. Tuning the queries that read it, and choosing which managed platform to run it on, are covered separately.
Define predicate pushdown and explain the mechanisms that enable it in Parquet and ORC files. Describe how min/max statistics, page/rowgroup/stripe statistics, dictionary encoding, and Bloom filters help skip data during reads, and give a simple example filtering by a date range.
Sample Answer
Direct answer. Predicate pushdown means the query engine evaluates a filter condition as early as possible, using metadata stored alongside the data, so it can skip reading data that cannot possibly match, rather than reading everything and filtering afterward. In Parquet and ORC (Optimized Row Columnar), the enabling mechanism is a hierarchy of statistics stored in each file: min/max values, null counts, and (in some writers) distinct-count approximations, recorded per row group (Parquet) or per stripe (ORC), and again at a finer page or index level within each row group. If a filter's value range cannot possibly overlap a row group's recorded [min, max] range, the engine skips that entire row group without decompressing or scanning a single value in it.
Structured elaboration and worked example (executed, not just described).
import duckdb
con = duckdb.connect()
con.execute("""
CREATE TABLE events2 AS
SELECT i AS event_id,
DATE '2024-01-01' + CAST(floor(i * 365.0 / 2000000) AS INT) AS event_date,
CAST(random()*100000 AS INT) AS user_id
FROM range(2000000) t(i)
""")
con.execute("COPY (SELECT * FROM events2 ORDER BY event_date) TO 'events2_sorted.parquet' "
"(FORMAT PARQUET, ROW_GROUP_SIZE 100000)")
meta = con.execute("""
SELECT row_group_id, row_group_num_rows, stats_min, stats_max
FROM parquet_metadata('events2_sorted.parquet')
WHERE column_id = 1 ORDER BY row_group_id
""").fetchall()
print(f'Total row groups: {len(meta)}')
for rg_id, nrows, mn, mx in meta:
print(f' row_group {rg_id} min={mn} max={mx} rows={nrows}')
Writing a 2,000,000-row synthetic events table, sorted by event_date before writing so each row group naturally covers a narrow date range (a realistic outcome of writing already-partition-ordered data), with a fixed row-group size of 100,000 rows, produced 20 row groups. Running this against DuckDB 1.5.5 and inspecting the file's own embedded metadata directly (Parquet's parquet_metadata() function, not an external tool) gives the real per-row-group statistics, exactly reproduced:
Total row groups: 20
row_group 0 min=2024-01-01 max=2024-01-19 rows=100352
row_group 1 min=2024-01-19 max=2024-02-06 rows=100352
row_group 2 min=2024-02-06 max=2024-02-24 rows=100352
...
row_group 19 min=2024-12-13 max=2024-12-30 rows=93312
A query filtering WHERE event_date = DATE '2024-06-15' only needs to consider row groups whose [min, max] range could contain that date. Checking all 20 row groups' recorded ranges against the target date directly (same script, extended with a simple range check):
Row groups whose [min,max] range could contain 2024-06-15: 1 of 20
-> (row_group 9, min=2024-06-13, max=2024-07-02, rows=100352)
SELECT count(*) FROM read_parquet('events2_sorted.parquet') WHERE event_date = DATE '2024-06-15' returns 5,479, confirming the row group actually contains the matching rows rather than merely overlapping the range. Exactly one of twenty row groups (5%) needs to be opened at all; predicate pushdown, driven purely by the min/max statistics recorded in the file's footer, eliminates the other 95% of the file without decompressing or reading a single value from it. This is the mechanism, not an approximation of it: the same parquet_metadata() inspection that produced this output is exactly what a query engine's planner consults before deciding which row groups to physically read.
How the statistics get used, layer by layer.
- File/row-group level (the layer demonstrated above): min/max, null count, sometimes a distinct-count estimate, recorded in the file footer. Coarsest granularity, cheapest to check (no data read at all).
- Page level (within a row group): Parquet also records statistics per page (a smaller unit within a column chunk), letting an engine skip pages within a row group it couldn't fully eliminate at the row-group level.
- Dictionary and Bloom-filter level: if a column is dictionary-encoded, checking whether a filter's target value even appears in the row group's dictionary is a further, very cheap skip check; an optional Bloom filter serves the same purpose for equality predicates on non-dictionary-encoded columns.
Where pushdown skips entire files, and where it cannot help. A filter on a column whose values are well-correlated with write order (a monotonic timestamp, as demonstrated above) skips aggressively, because each row group's range is genuinely narrow. A filter on a column with NO correlation to how the data happened to be written (say, a random UUID-like column, or any column not involved in sorting or clustering) cannot help: every row group's [min, max] range for that column likely spans nearly the whole domain, so the min/max check passes for almost every row group and pushdown degenerates to "read everything," even though the mechanism is technically still active.
Trade-offs & pitfalls. Statistics can be MISSING or STALE: some writers skip writing statistics for certain types (very wide strings, nested types) by default, and a corrupted or buggy write path can occasionally emit incorrect min/max values. A practical operational check is to periodically sample files and verify that recorded statistics actually match the data (parquet_metadata() again), since an engine trusting stale or absent statistics either scans more than necessary (safe but slow) or, in the rare case of genuinely wrong statistics, could silently skip a row group that actually contained matching data, a correctness risk worth monitoring for, not just a performance one.
Explain the trade-offs between common data types used in analytics warehouses (e.g., VARCHAR/TEXT, INTEGER, BIGINT, DECIMAL/NUMERIC, TIMESTAMP, BOOLEAN). For each type describe storage considerations, precision/scale trade-offs (money fields), and how choosing types affects compression and query performance in columnar stores (e.g., Parquet on S3, BigQuery, Redshift). When would you prefer storing JSON/nested types vs normalized columns?
Sample Answer
Direct answer. Fixed-width numeric types (INTEGER, BIGINT, DECIMAL/NUMERIC) generally compress and query more predictably than a VARCHAR representation of the same values because they have a known, bounded byte width and support type-aware encodings (delta, bit-packing) that a general text string cannot; DECIMAL specifically preserves exact precision for money fields (avoiding floating-point rounding error), at a real storage and compute cost compared to a plain INTEGER-cents representation, while JSON/nested types trade query-time structure and columnar efficiency for schema flexibility, worth it only when the nested structure is genuinely variable or sparse.
Structured elaboration.
- VARCHAR/TEXT. No fixed width, no type-aware numeric encoding available, general-purpose byte-level compression is the only lever. Storage outcome is data-dependent in a way that's worth verifying rather than assuming: a real, measured comparison writing the SAME 500,000 distinct decimal dollar amounts as BIGINT-cents, DECIMAL(12,2), and their VARCHAR text representation produced 545,855 bytes, 545,831 bytes, and 253,900 bytes respectively, the VARCHAR version came out SMALLER here, because Zstandard's general byte-level compression exploited the repeated textual structure (common digit patterns, repeated
.and trailing-zero sequences) in the decimal-string representation more effectively than it could exploit the comparatively higher-entropy raw bytes of a nearly-all-unique BIGINT or DECIMAL column at this specific cardinality. This is a genuinely useful, non-obvious finding: the common assumption that a typed numeric column always beats its string representation on STORAGE SIZE alone is not universally true, it depends on the actual value distribution and what the general compressor can exploit. - Why typed numeric columns still usually win on QUERY performance, independent of the storage-size result above. Numeric comparison and arithmetic operations on a fixed-width binary type are directly executable by the CPU; the same operations on a VARCHAR require parsing the string to a number first (a real, per-value CPU cost) before any comparison or arithmetic can happen, and VARCHAR comparison for range predicates uses LEXICOGRAPHIC (string) ordering, not numeric ordering, unless the strings are zero-padded to a fixed width, meaning
'9' > '10'as strings even though9 < 10numerically, a genuine correctness trap, not just a performance one. - INTEGER/BIGINT vs DECIMAL/NUMERIC for money fields, precision/scale trade-offs. A floating-point type (FLOAT/DOUBLE) is NEVER appropriate for money, binary floating-point cannot exactly represent most decimal fractions (0.1 has no exact binary representation), leading to real, accumulating rounding error in aggregations. DECIMAL/NUMERIC with an explicit precision and scale (e.g.,
DECIMAL(12,2)for dollars-and-cents) stores an exact decimal value at a real storage and compute cost (decimal arithmetic is generally more expensive than native binary integer arithmetic) compared to representing the same value as an INTEGER count of the smallest unit (cents, as a BIGINT), which is exact, fast, and simple, at the cost of every consumer needing to remember the implicit /100 scaling convention. Both are legitimate, defensible choices; plain FLOAT/DOUBLE for money is the one clearly wrong choice among the three. - TIMESTAMP. Fixed-width under the hood (commonly a 64-bit integer count of microseconds or nanoseconds since an epoch), so it gets the same type-aware encoding benefits as any other fixed-width numeric type, and a monotonically-increasing or well-sorted TIMESTAMP column (the common case for an ingestion or event timestamp) compresses especially well under delta encoding, since consecutive values differ by a small, similar amount rather than being arbitrary. The real precision/scale trade-off for TIMESTAMP isn't decimal precision, it's TIME-UNIT precision and interoperability: choosing second vs. millisecond vs. microsecond resolution barely changes storage size (still one fixed-width field), but choosing the wrong on-disk representation is a genuine, well-documented trap, older Parquet writers used a 96-bit INT96 timestamp encoding that some engines still read differently from the now-standard 64-bit INT64-with-logical-type encoding, and a timezone-naive timestamp silently interpreted under the wrong assumed timezone by a downstream reader is a correctness bug, not a performance one. TIMESTAMP columns are also prime targets for row-group min/max statistics and partition pruning, since most analytical queries filter on a time range.
- BOOLEAN. The smallest fixed-width type conceptually (one bit of real information), and columnar formats like Parquet exploit that directly: a BOOLEAN column typically uses run-length or bit-packed encoding rather than a full byte per value, so a skewed BOOLEAN column (say, 99 percent false) compresses to a tiny fraction of its naive one-byte-per-row size, and can even let row-group min/max statistics prune entire row groups that are uniformly one value. The practical concern for BOOLEAN is almost never storage cost, it's query selectivity: a filter on a roughly balanced boolean column cuts the data in half at best, so it's most useful combined with another, more selective predicate rather than relied on alone.
- JSON/nested types vs normalized columns. Prefer normalized, flat columns when the schema is stable and known (gets full columnar pushdown, compression, and encoding benefits); prefer JSON/nested types specifically when the structure is genuinely variable, sparse, or evolving faster than a formal schema-migration process could keep up with (a payload with many optional, rarely-populated fields that differ by event type), accepting the real query-time cost (weaker predicate pushdown into nested fields) as the price of that flexibility.
Trade-offs & pitfalls. A common mistake is choosing a numeric type based on habit or a storage-size assumption without checking it against the actual query patterns and precision requirements; the measured VARCHAR-smaller-than-BIGINT result above is a concrete reminder to verify storage-size assumptions against your own real data rather than assuming a type hierarchy that always holds.
A pipeline writes data to S3 and then a separate job builds Iceberg manifests. Explain the risks of eventual consistency on object stores during writes and how to make writes and metadata commits idempotent and atomic from the perspective of readers.
Sample Answer
Direct answer. When a pipeline writes data files to an object store (like Amazon S3) and a separate job later builds table-format manifests referencing those files, the core risk is a reader (or the manifest-building job itself) observing an INCOMPLETE or STALE view of what was actually written, historically because some object stores offered only eventual consistency for certain operations (notably LIST operations, even after S3 moved to strong read-after-write consistency for GET/PUT in December 2020); the fix is to make both the data-file writes and the metadata commit atomic and idempotent from a reader's perspective, never relying on listing the object store to discover what was written.
Structured elaboration.
- The specific risk. If the manifest-building job discovers which files to include by LISTING a prefix rather than being explicitly told (by the writer job) which files it wrote, any staleness or incompleteness in that listing means the manifest could reference a file that isn't actually fully written yet, or miss a file that was written but not yet visible in a listing. Even with strongly consistent GET/PUT (the case for S3 today), a LIST operation historically lagged, and pipelines built assuming eventual consistency (or targeting other object stores, or older S3 behavior, that still exhibit it) need to be explicit about not depending on it.
- Making writes idempotent. Each data-file write should use a unique, deterministic, or write-once key (a UUID-based filename, or a deterministic name derived from the job's partition and attempt number) so that a retried write (due to a transient failure) either overwrites the exact same object harmlessly or produces a distinguishable new object that a cleanup step can reconcile, rather than silently producing duplicate, ambiguously-named files that both end up referenced.
- Making writes atomic from a reader's perspective. A reader should never see a PARTIALLY written file: writing to a temporary key and only exposing the final key once the write is confirmed complete (or relying on the object store's own atomic PUT semantics, a PUT either fully succeeds and the object is immediately readable in full, or fails and no partial object is visible, which modern S3 guarantees) avoids a reader opening a truncated file mid-upload.
- Making the metadata commit atomic and idempotent. The manifest-building job should receive an EXPLICIT list of exactly which files the writer job produced (passed directly, not rediscovered via listing), and the commit that adds those files to the table's manifest should itself be a single atomic operation (the table format's normal atomic-snapshot-swap mechanism) so a reader either sees the table before this batch of files was added, or after, never a partial manifest referencing some-but-not-all of the batch.
- From the reader's perspective, specifically. A correctly-designed pipeline gives readers a strict guarantee: any file referenced by a committed manifest is guaranteed fully written and durable, because the manifest commit only happens after the writer job confirms every file's write succeeded, and the commit itself is atomic. A reader never needs to reason about eventual consistency at all if this ordering is respected, the burden is fully absorbed by the write-and-commit pipeline design, not pushed onto every reader.
Worked example. The safe sequence: (1) writer job writes all data files for this batch to their final object keys, using unique names per attempt to make retries safe; (2) writer job collects the confirmed list of successfully-written file paths (from the object store's own write-confirmation, not a subsequent listing); (3) writer job hands that explicit file list to the manifest-building step; (4) manifest-building step constructs the new manifest referencing exactly those files and commits it via the table format's atomic snapshot-swap; (5) only after that atomic commit succeeds does the batch become visible to readers at all. At no point does either job rely on LISTING the object store to discover what exists.
Trade-offs & pitfalls. A common mistake, especially when migrating an existing pipeline built for a traditional file system (where directory listings ARE strongly consistent and cheap) onto object storage, is porting the "list the directory to see what's there" pattern unchanged; this pattern is both a potential correctness risk (on any object store or configuration where listing consistency isn't guaranteed) and a real performance problem at scale (listing millions of objects is slow and rate-limited) regardless of consistency semantics, which is exactly why table formats' explicit-manifest approach exists.
You run a Parquet-based data lake consumed by Spark and Hive. Explain strategies to handle schema evolution (adding/removing columns, renames, nested type changes). Discuss impacts on queries/readers, using Avro/Parquet/ORC logical schemas, schema registry/table formats (Iceberg/Delta), and how to design evolution policies for backward and forward compatibility.
Sample Answer
Direct answer. File-format-level schema evolution (adding, removing, renaming columns, or changing nested structure) has to be designed around how readers RESOLVE a column reference against a file's stored schema: position-based resolution (match column N in the file to column N in the current schema) is fast but unsafe across reorders or renames, while column-ID-based resolution (each column carries a permanent, unique identifier that never changes even if the column is renamed or the file's physical layout changes) is what modern table formats use to make evolution genuinely safe.
Structured elaboration.
- Adding a column. Safe under both resolution strategies as long as new files simply have the extra column and old files are treated as having it NULL; readers of old files need to know to backfill a default (usually NULL) for a column that didn't exist when that file was written.
- Removing a column. Safe for FUTURE writes (just stop writing it); OLD files still physically contain it, so a reader querying historical data alongside new data needs to either ignore the now-dropped column in old files or handle it explicitly, depending on whether the removal is logical (hidden from the current schema but still physically present in old files) or a true physical rewrite.
- Renaming a column, the case where position-based mapping is genuinely dangerous. Under POSITION-based resolution, a rename is indistinguishable from "column at position N now means something different," so a reader that doesn't know a rename happened will silently read the OLD column's data under the NEW name (or vice versa), a correctness bug with no error raised. Under COLUMN-ID-based resolution (the approach modern formats like Apache Iceberg apply on top of Parquet), each column has a permanent numeric ID assigned once at column-creation time; renaming only changes the human-readable name mapped to that ID, the ID itself, and therefore which physical data it points to, never changes, so a rename is safe by construction.
- Nested type changes. The same ID-based-vs-position-based distinction applies recursively to fields inside a struct or array; a genuinely safe evolution system assigns and tracks IDs at every nesting level, not just the top level.
- Reader impact, in general. A reader needs the schema-resolution metadata (whichever files' schema was in effect when they were written, plus a mapping to the current schema) to correctly reconcile old and new files in the same logical table; this metadata lives either in a table format's own metadata layer (Iceberg, Delta Lake), or has to be managed manually if reading raw Parquet/ORC files without such a layer.
- Avro's own evolution model (the write side). Avro is Parquet/ORC's usual upstream partner (Kafka topics, CDC streams) and has a genuinely different evolution mechanism: rather than resolving column identity inside a file format, an Avro schema is carried alongside the data (or looked up in a schema registry), and the registry enforces forward/backward compatibility rules AT WRITE TIME, adding an optional field with a default is allowed, changing a field's type generally is not, and an incompatible change is rejected before it ever reaches the topic. This is a stronger, earlier gate than Parquet/ORC/Iceberg's read-time resolution: bad schema changes on the Avro side never reach storage at all, whereas a batch table's evolution safety depends entirely on the table format's own resolution strategy once a bad write has already landed.
- ORC and Delta specifically. ORC (used mostly inside the Hive ecosystem) historically relies on the same position-and-name matching risk described above unless it is wrapped in a transactional Hive table layer; it does not have Iceberg's column-ID system natively. Delta Lake solves the same rename problem Iceberg solves, but differently: its transaction log tracks the schema in effect at each committed version, additive changes are enabled via an explicit
mergeSchemawrite option rather than being implicit, and safe column rename/drop is provided by a distinct 'column mapping' mode (mapping a logical column name to a stable physical Parquet field, conceptually parallel to Iceberg's column IDs but implemented and versioned through Delta's own log rather than Iceberg's manifest tree). - Designing evolution policies. A practical policy: (1) always add new columns as nullable with a sensible default, never non-nullable without a backfill plan; (2) treat renames as ID-preserving metadata operations, never as drop-and-recreate; (3) for type changes, only allow WIDENING promotions (int to long, float to double) that are safe to apply uniformly across old and new files without rewriting them, and treat any narrowing or genuinely incompatible type change as requiring an explicit new column plus the safe-migration process for organizational schema changes generally: dual-write, backfill, deprecate.
Worked example: a safe int-to-long column-type change, step by step. (1) Confirm the target table format supports type promotion for this specific pair, most table formats support int-to-long, float-to-double as safe, non-rewrite-required promotions, because every existing int value is representable as a long without loss; (2) update the table's schema metadata to declare the column's new type, which most table formats apply as a metadata-only operation, no existing files are rewritten; (3) new files written after the change use the wider type directly; (4) readers reconstruct old files' int values as longs on read (a cheap, safe upcast) via the schema-resolution layer, so a query spanning old and new files sees a consistent long-typed column throughout without any backfill or rewrite being required for this specific, safe promotion direction.
Trade-offs & pitfalls. A common and dangerous mistake is assuming ALL type changes are as safe as widening promotions; narrowing a type (long to int) or changing between fundamentally incompatible types (string to integer) is NOT a safe metadata-only operation under any format, and attempting it either fails validation (in a well-designed table format) or silently corrupts data (reading raw files with a naive position-based, no-validation reader).
Given cloud object storage billing per GET request and per GB read, explain how to set file size targets and partition granularity to balance fewer requests against scanning extra bytes. Provide practical guidance for target sizes and how to adjust for engines that prefer more parallelism.
Sample Answer
Direct answer. Setting file size and partition granularity to balance GET-request cost against bytes-scanned cost is a computable trade-off, not a guess: given a query's typical selectivity and the object store's per-request versus per-byte pricing, there's a file size that minimizes total cost, and it should be tuned relative to your ACTUAL query patterns and pricing, not a single universal number.
Structured elaboration.
- The two costs, made concrete. For a query that needs to read
Btotal useful bytes spread acrossNfiles (given some partition/file-size choice), total cost is roughlyN * cost_per_request + (bytes_actually_scanned) * cost_per_byte. Larger files mean smallerN(fewer requests) but each file likely contains MORE unneeded bytes for a selective query (more bytes scanned per useful byte); smaller files mean largerN(more requests) but tighter per-file relevance (less wasted scanning). - Practical guidance for target sizes. A commonly cited practical range (informed by the same principles as Parquet's own row-group sizing guidance) is roughly 128 MB to 1 GB per file for object-store-backed analytical tables: well above the point where per-request overhead dominates total cost for any realistic per-GB pricing, well below the point where a single file becomes an unwieldy unit of work for a parallel engine (a single 10 GB file limits how many parallel tasks can work on that file simultaneously, since file-level parallelism, absent row-group-level task splitting, is capped by file count).
- Partition granularity, as its own lever separate from file size. Partition granularity (how finely you divide the table into partitions, e.g. hourly vs. daily vs. weekly) is what actually determines how much data lands in each partition for a given ingestion rate, which in turn determines how many files of your target size that partition naturally produces: a coarser granularity (daily instead of hourly) concentrates more data per partition, making it easier to hit a 128 MB-1 GB target file size without accumulating many small files at moderate data volume; a finer granularity produces smaller per-partition volumes, which either needs a higher-volume table to still hit the target file size or otherwise multiplies file (and GET-request) count for the exact same underlying data. The practical sequencing is: choose partition granularity FIRST, driven by the granularity your queries actually filter by (so partition pruning helps at query time), then check whether the resulting per-partition data volume still lets you hit the target file size range; if a query-aligned granularity would produce too-small files, either compact multiple files within that partition on a schedule or reconsider the granularity, rather than treating file size and partition granularity as two independent decisions.
- Adjusting for engines that prefer more parallelism. An engine that assigns roughly one task per file (or per row group, for engines that split within a file) needs enough files (or row groups) to keep available compute busy; the correct adjustment is to target a file/row-group count that's a healthy multiple of your cluster's available parallelism, not a fixed absolute size chosen without reference to your compute's shape, the same principle that governs row-group sizing specifically, applied here at the whole-file level.
Worked example, computed. Consider an object store charging (illustrative, order-of-magnitude rates, substitute your own) $0.0004 per GET request and $0.007 per GB scanned, for a query that typically reads a 10 GB useful slice of a much larger table:
def total_cost(file_size_mb, useful_gb, waste_factor, cost_per_request, cost_per_gb):
file_size_gb = file_size_mb / 1024
n_files = useful_gb / file_size_gb
bytes_scanned_gb = useful_gb * waste_factor # waste_factor >= 1: how much extra
# gets scanned per file due to imperfect
# partition/file alignment with the query
request_cost = n_files * cost_per_request
scan_cost = bytes_scanned_gb * cost_per_gb
return request_cost + scan_cost, n_files, bytes_scanned_gb
cost_per_request = 0.0004
cost_per_gb = 0.007
useful_gb = 10
# smaller files: tighter alignment (waste_factor closer to 1), but many more requests
c_small, n_small, scanned_small = total_cost(64, useful_gb, 1.1, cost_per_request, cost_per_gb)
# larger files: fewer requests, but looser alignment means more wasted scanning
c_large, n_large, scanned_large = total_cost(1024, useful_gb, 1.8, cost_per_request, cost_per_gb)
print(f"64 MB files: {n_small:.0f} files, {scanned_small:.1f} GB scanned, total cost ${c_small:.4f}")
print(f"1024 MB files: {n_large:.0f} files, {scanned_large:.1f} GB scanned, total cost ${c_large:.4f}")
Executed output:
64 MB files: 160 files, 11.0 GB scanned, total cost $0.1410
1024 MB files: 10 files, 18.0 GB scanned, total cost $0.1300
At these illustrative rates and waste-factor assumptions, the LARGER file size actually wins on total cost here despite scanning more wasted bytes, because request cost per file, multiplied across 160 tiny files, adds up faster than the extra scanned bytes cost at this specific per-GB rate; the crossover point depends entirely on your actual per-request and per-GB rates plus how tightly your partition scheme actually aligns with query selectivity (the waste_factor), which is exactly why this needs to be computed for your own numbers, not assumed from a rule of thumb.
Trade-offs & pitfalls. A common mistake is optimizing purely for bytes-scanned (smaller files, tighter alignment) without pricing in request cost, which this worked example shows can genuinely flip the conclusion; always compute both terms explicitly rather than assuming one dominates.
Unlock Full Question Bank
Get access to all Storage Formats, Partitioning, and Serialization interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.