Skip to content

test(spark): characterize HadoopUtils S3 and Azure credential forwarding - #8850

Merged
robert3005 merged 1 commit into
vortex-data:developfrom
jackylee-ch:spark-hadoop-utils-tests
Aug 3, 2026
Merged

robert3005 merged 1 commit into
vortex-data:developfrom
jackylee-ch:spark-hadoop-utils-tests

Conversation

@jackylee-ch

Copy link
Copy Markdown
Contributor

Rationale for this change

HadoopUtils (java/vortex-spark/src/main/java/dev/vortex/spark/config/HadoopUtils.java)
is the bridge that forwards S3 and Azure credentials from the Spark session's Hadoop
Configuration into the Vortex object-store property keys, and it currently has no test
coverage. A silently broken key mapping here doesn't fail loudly — it surfaces as
authentication errors (or unintentionally anonymous access via the Azure
skip_signature fallback) only when running against real cloud storage. This continues
the characterization-test series from #8770 (ArrowUtils), #8782 (SparkToArrowSchema),
and #8783 (PartitionPathUtils).

What changes are included in this PR?

A new HadoopUtilsTest covering both public methods:

  • s3PropertiesFromHadoopConf: maps fs.s3a.access.key / fs.s3a.secret.key /
    fs.s3a.session.token / fs.s3a.endpoint.region to the corresponding aws_* keys;
    qualifies a bare fs.s3a.endpoint with https:// while preserving endpoints that
    already carry an http:// or https:// scheme; ignores unrelated Hadoop keys and
    returns an empty map for an empty configuration.
  • azurePropertiesFromHadoopConf: extracts the storage account key from any
    fs.azure.account.key-prefixed entry and the SAS token from any
    fs.azure.sas.fixed.token.-prefixed entry; sets azure_skip_signature=true whenever
    no account key is present (including the SAS-token-only case); ignores unrelated
    fs.azure.* keys.

This is a test-only change; no production code is modified. 10 tests, passing
locally on both matrix legs (:vortex-spark_2.12:test and :vortex-spark_2.13:test
with --tests 'dev.vortex.spark.config.HadoopUtilsTest').

What APIs are changed? Are there any user-facing changes?

None. No production code or public API is touched.

@codspeed

codspeed Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Merging this PR will regress 2 benchmarks

⚡ 27 improved benchmarks
❌ 2 regressed benchmarks
✅ 1813 untouched benchmarks
⏩ 55 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation delta_decompress_u32 522.5 µs 990.8 µs -47.27%
❌ Simulation delta_compress_u32 524.3 µs 992.8 µs -47.19%
⚡ Simulation alp_rd_compress_f64 28.3 ms 2.7 ms ×10
⚡ Simulation compress_alp[f32, (10000, 0.01, 1.0)] 253.3 µs 198.3 µs +27.73%
⚡ Simulation compress_alp[f32, (10000, 0.1, 0.95)] 311.1 µs 244.6 µs +27.22%
⚡ Simulation compress_alp[f32, (10000, 0.1, 1.0)] 266.5 µs 210.1 µs +26.85%
⚡ Simulation compress_alp[f32, (10000, 0.01, 0.25)] 263.8 µs 209.8 µs +25.75%
⚡ Simulation compress_alp[f32, (10000, 0.01, 0.95)] 265.1 µs 211.7 µs +25.22%
⚡ Simulation compress_alp[f32, (10000, 0.1, 0.25)] 302.7 µs 244.5 µs +23.8%
⚡ Simulation compress_rd[f32, (100000, 0.1)] 2.4 ms 2 ms +19.56%
⚡ Simulation compress_alp[f64, (10000, 0.1, 0.95)] 394.1 µs 331.2 µs +19.01%
⚡ Simulation compress_rd[f32, (100000, 0.01)] 2.3 ms 2 ms +18.8%
⚡ Simulation compress_rd[f32, (100000, 0.0)] 2.3 ms 2 ms +18.71%
⚡ Simulation compress_alp[f64, (10000, 0.1, 1.0)] 345.6 µs 291.3 µs +18.63%
⚡ Simulation compress_alp[f64, (10000, 0.01, 1.0)] 325.8 µs 274.8 µs +18.55%
⚡ Simulation compress_alp[f64, (10000, 0.01, 0.25)] 336.4 µs 286.2 µs +17.53%
⚡ Simulation compress_alp[f64, (10000, 0.01, 0.95)] 337.7 µs 288.3 µs +17.13%
⚡ Simulation compress_rd[f64, (100000, 0.1)] 2.9 ms 2.6 ms +15.28%
⚡ Simulation compress_alp[f64, (10000, 0.1, 0.25)] 382.1 µs 332.1 µs +15.06%
⚡ Simulation compress_rd[f64, (100000, 0.01)] 2.9 ms 2.6 ms +14.69%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing jackylee-ch:spark-hadoop-utils-tests (b48023b) with develop (f03d7e7)2

Open in CodSpeed

Footnotes

  1. 55 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on develop (81600aa) during the generation of this report, so f03d7e7 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@jackylee-ch
jackylee-ch force-pushed the spark-hadoop-utils-tests branch from f8cb4b4 to e4fa40e Compare July 21, 2026 10:32
@jackylee-ch
jackylee-ch force-pushed the spark-hadoop-utils-tests branch from e4fa40e to b48023b Compare August 3, 2026 10:41
robert3005 pushed a commit that referenced this pull request Aug 3, 2026
…8859)

## Rationale for this change

`VortexBatchExec`
(`java/vortex-spark/src/main/java/dev/vortex/spark/read/VortexBatchExec.java`)
turns the scan's resolved paths into Spark `InputPartition`s, and it
currently has no
direct test coverage. Its planning contract is easy to break silently:
each `.vortex`
file must become exactly one `VortexFilePartition`, each partition must
carry the
Hive-style partition values parsed from *its own* path (not a
neighbour's), and the
read schema and format options must survive into every partition — these
are what the
executor-side reader relies on to materialize partition columns
correctly. This
continues the characterization-test series from #8770, #8782, #8783,
#8850, and #8857.

## What changes are included in this PR?

A new `VortexBatchExecTest` with 5 tests covering `planInputPartitions`
for explicit
`.vortex` paths (which never touch native directory listing, keeping
this a pure unit
test):

- one `VortexFilePartition` per file, each holding exactly one path;
- partitions preserve the input path order;
- the requested read schema is carried into every partition;
- Hive-style partition values are parsed from each file's own path
(`year=2024/month=01`
vs `year=2025/month=02` vs an unpartitioned path yielding an empty map);
- format options are propagated to every partition.

This is a **test-only** change; no production code is modified. All 5
tests pass
locally on both matrix legs (`:vortex-spark_2.12:test` and
`:vortex-spark_2.13:test`
with `--tests 'dev.vortex.spark.read.VortexBatchExecTest'`).

## What APIs are changed? Are there any user-facing changes?

None. No production code or public API is touched.

Signed-off-by: jackylee <qcsd2011@gmail.com>
@robert3005
robert3005 enabled auto-merge (squash) August 3, 2026 11:00
@robert3005
robert3005 merged commit d667f59 into vortex-data:develop Aug 3, 2026
72 of 73 checks passed
robert3005 pushed a commit that referenced this pull request Aug 6, 2026
…ing (#8857)

## Rationale for this change

`VortexScanBuilder`
(`java/vortex-spark/src/main/java/dev/vortex/spark/read/VortexScanBuilder.java`)
decides which Spark V2 predicates are pushed into the Vortex scan and
which are returned
to Spark for post-scan evaluation, and it currently has no direct test
coverage. The
split logic encodes correctness-critical rules: predicates referencing
partition columns
must *not* be pushed (partition values live in directory paths, not
inside the Vortex
files), untranslatable operators must be returned to Spark, and
`pushedPredicates()`
must not expose internal state. A regression in any of these silently
drops filters or
scans the wrong data. This continues the characterization-test series
from #8770,
#8782, #8783, and #8850.

## What changes are included in this PR?

A new `VortexScanBuilderTest` with 9 tests covering:

- **`pushPredicates` on data columns**: a supported predicate on a data
column is pushed
and removed from the post-scan set; predicates referencing columns
absent from the
read schema, or using operators `SparkPredicateToVortexExpression`
cannot translate
(e.g. a raw `LIKE`), are returned to Spark and never recorded as pushed.
- **`pushPredicates` on partition columns**: a predicate on an
identity-partitioned
column is left to Spark; mixed batches split correctly (data-column
predicate pushed,
partition-column predicate post-scan); an `And` spanning a data column
and a partition
  column is kept whole on the Spark side.
- **`pushedPredicates`**: empty before any push, and returns a defensive
copy so callers
  cannot mutate the builder's internal state.
- **`build`**: fails fast with `IllegalStateException` when no paths
were added.

This is a **test-only** change; no production code is modified. All
tests pass locally
on both matrix legs (`:vortex-spark_2.12:test` and
`:vortex-spark_2.13:test` with
`--tests 'dev.vortex.spark.read.VortexScanBuilderTest'`).

## What APIs are changed? Are there any user-facing changes?

None. No production code or public API is touched.

Signed-off-by: jackylee <qcsd2011@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants