Skip to content

refactor: drop unused code and narrow queries - #9681

Merged
aglinxinyuan merged 6 commits into
apache:mainfrom
aglinxinyuan:refactor/scala-unused-bindings-fixtures
Nov 25, 2026
Merged

aglinxinyuan merged 6 commits into
apache:mainfrom
aglinxinyuan:refactor/scala-unused-bindings-fixtures

Conversation

@aglinxinyuan

@aglinxinyuan aglinxinyuan commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Remove unused code from the Scala sources and tests of the Amber engine and web server, workflow-core, workflow-operator, observability and the notebook-migration service, and narrow the database reads of the account, notification, dashboard-search, Hub and Jupyter-registration lookups to the columns and rows they use (+285/-316 lines). Production behavior does not change. Two CSV tests that are named for multi-line data now read the multi-line file.

Unused code

  • Unused bindings: pattern, catch and callback bindings that nothing reads become _ in ClusterListener, DeadLetterMonitorActor, Utils, SequentialRecordStorage, the argument parsers of ComputingUnitMaster and ComputingUnitWorker, WebsocketInput, WorkflowWebsocketResource, AiAssistantManager, ExecFactory, VirtualIdentityUtils, URLFetchUtil and HtmlVizOpDesc. The two argument parsers end in case _, since case Nil already takes the empty list.
  • S3StorageClient.uploadObject:
    • readChunk uses a plain while loop instead of assigning inside the loop condition.
    • The parts upload in a while loop that adds each CompletedPart to the Java list the SDK takes. Before, an Iterator of (partNumber, size) tuples became a Scala List and then went back through .asJava.
    • Each part is copied out of the reused buffer once and streamed from that copy. buffer.take and RequestBody.fromBytes, which calls Arrays.copyOf itself, copied it twice. The content provider gives each SDK attempt a fresh stream over the same bytes.
    • Part numbers, upload order, part sizes, the application/octet-stream content type and the read of the next chunk after each upload are unchanged.
  • SQLSourceOpExec.fetchBatchByBoundary: returns the result of the type match as a val instead of overwriting a var that starts as null.
  • Worker statistics: StatisticsManager.getStatistics drops the executor parameter it has not read since its sink-operator check went away. DataProcessor and both statistics specs stop passing an executor to it.
  • Telemetry: WorkflowMetricsRecorder drops a LazyLogging it never logs with, and WorkflowMetrics drops the Cancelled outcome and the Unknown workflow kind that nothing records.
  • Scan sources: SkippedRowReporter drops its uncalled count, and ArrowSourceOpExec drops a batch counter it only increments.
  • Arrow Flight benchmark: sorts each run's latencies once, instead of once per percentile.
  • Test helpers:
    • DPThreadSpec.awaitCond drops its unused default budget, and the spec's callbacks name their unused argument _.
    • ExternalAuthProvisionerSpec's seedUser and seedUserWithEmail drop the avatar parameter that no test passes.
    • DictionaryMatcherOpExecSpec.withExecutor, HashJoinOpSpec.tuple and the tuple builders of IntervalOpExecSpec drop defaults that every caller overrides.
    • PythonWorkerPool starts its stdout and stderr reader threads without keeping the references it never reads.
  • Test fixtures:
    • TestOperators drops asterixDBSourceOpDesc, a descriptor for the AsterixDB server at ipubmed4.ics.uci.edu that only its own TestOperatorsSpec case still built. It also drops the multiLine parameter that getCsvScanOpDesc never read.
    • headerlessSmallMultiLineDataCsvScanOpDesc reads country_sales_headerless_small_multi_line.csv again, so DataProcessingSpec's headerless multi-line case runs on multi-line data.
    • The matching CSVScanSourceOpDescSpec case now reads that file too, and checks the scanned rows: 100 rows of 14 fields, a quoted value with commas, and two values with line breaks.

Database reads

  • Account, login and notification queries:
    • AuthResource's login query selects the user columns and the password hash, instead of every column of the joined auth_provider and user rows. ExternalAuthProvisioner's lookup selects only the user columns.
    • The admin-bootstrap and add-email checks in AuthResource, the duplicate-email check in AdminUserResource and UserResource.isJoiningReasonRequired read one column, or use selectOne, instead of a full user row.
    • GmailResource reads only the requester's name and the admins' email addresses, compiles its email regex once, and passes the subject and the domain-suffixed content to createMimeMessage instead of copying the EmailMessage.
  • Dashboard search:
    • searchAllResources builds its results in one pass over the first count rows. Before, it built a list of entries, filtered out the omitted ones, and scanned the list again for hasMismatch.
    • getOrderFields drops the case None branch and the private getColumnField with its case _ => null, which its regex makes unreachable, and compiles the regex once.
    • WorkflowSearchQueryBuilder builds its access condition as a val instead of overwriting a DSL.trueCondition() initializer. VersionedResourceSearchQueryBuilder drops a getGroupByFields override that returns the base default.
    • VersionedResourceTables.hydrate stops pairing each entry with a resource ID that every caller discarded, drops idOf, and reads the owner email from the record without building a User POJO.
  • Hub (HubResource):
    • The versioned-resource lookup selects the resource columns, the owner email and the privilege that hydrate reads, instead of every joined column. VersionedResourceTables.hydrationFields defines that list next to hydrate, because a query that left a column out would get a null email or privilege without an error.
    • isLikedHelper collects the liked IDs with fetchSet. Like/unlike and clone check for an existing row with fetchExists instead of fetching it, and like/unlike no longer goes through the batch helper.
    • getCounts reuses each entity type's request group, and drops the zero entries it added for missing view counts, since the lookup already defaults to 0.
  • Notebook migration: NotebookMigrationResource stops selecting the notebook ID it never reads, and drops JSONB casts that its typed fields make redundant. JupyterEndpointResolver selects the two registration URLs instead of a full user_jupyter row, and JupyterProvisioner derives a healthy registration's token once instead of twice.

Tests for rewritten paths no test reached

  • DatasetSearchQueryBuilderSpec runs a dataset search over a dataset that lakeFS rejects, and expects it left out with hasMismatch set.
  • HubResourceSpec fetches such a dataset by ID and expects it dropped.
  • AdminUserResourceSpec moves a user to an address no other account uses.
Event PR / Commit
Introduced by Amber engine and web server: #945 (2021-01-05), #1101 (2021-05-03), #1387 (2022-02-10), #1381 (2022-05-13), #1671 (2022-11-07), #1677 (2022-11-07), #2060 (2023-07-14), #2529 (2024-03-29), #2570 (2024-04-07), #2808 (2024-09-02); account and notification queries: #3080 (2024-11-19), #3393 (2025-04-29), #3440 (2025-06-08), #4185 (2026-02-16), #7055 (2026-08-10), #7758 (2026-08-21), #7639 (2026-08-30), #7978 (2026-08-31); dashboard search and Hub: #2358 (2024-02-23), #2838 (2024-09-25), #3252 (2025-02-09), #3446 (2025-05-26), #3442 (2025-06-28), #3519 (2025-07-09), #7928 (2026-08-26), #7930 (2026-09-01), #8890 (2026-10-27); workflow-core: #2271 (2024-01-18), #3183 (2024-12-31), #4067 (2025-11-25); workflow-operator: #1013 (2021-02-11), #1866 (2023-03-23), #3139 (2024-12-06), #3186 (2024-12-31), #6947 (2026-10-02); observability: #5376 (2026-10-27); notebook migration: #5258 (2026-06-24), #8032 (2026-09-03); tests and benchmark: #1044 (2021-02-25), #1083 (2021-04-25), #1227 (2021-07-25), #2254 (2023-12-13), #2302 (2024-02-05), #3425 (2025-05-26), #4836 (2026-05-03), #5439 (2026-06-06), #5557 (2026-06-11), #6077 (2026-07-03), #7116 (2026-07-31), #7207 (2026-08-14), #7870 (2026-08-23), #7875 (2026-08-31), #9534 (2026-11-19), #9518 (2026-11-21)
Usage removed by AsterixDB fixture: #1118 (2021-05-11, Disable dependent tests with AsterixDB) commented out its only test use, which #3294 (2025-03-04) deleted; multi-line fixture: #3111 (2024-11-26, Update amber to depend on sub projects) pointed headerlessSmallMultiLineDataCsvScanOpDesc at the single-line file; awaitCond's default budget: #9534 (2026-11-19, test(amber): share engine and service test fixtures) routed its last callers through a helper that always passes one; getStatistics' executor parameter: #3312 (2025-03-12, Remove Sink Operator in the Backend) dropped its only read, the sink-operator check; everything else: unused or redundant since introduction

As of 2026-11-24, the AsterixDB fixture has had no test use for over 5 years, and the headerless multi-line CSV fixture has read single-line data for about 12 months.

Any related issues, documentation, discussions?

Closes #9680.

How was this PR tested?

The first commit (cb95cd29b7) ran on its base, main at de3f021dec. The second commit ran on this branch before it (2e980903c8, after merging main) and after it, the third likewise on dee7711a88, the fourth on 3870a2da97, and the fifth on 4c244837bf. Both used Windows 11, JDK 17, UDF_PYTHON_PATH set to Python 3.12, and Docker for the RustFS container that S3StorageClientSpec starts. The e2e case uses the Hadoop Iceberg catalog because no REST catalog runs on this machine:

WUNUSED='set ThisBuild / scalacOptions += "-Wunused:patvars,params,privates"'
sbt "$WUNUSED" "WorkflowCore/testOnly org.apache.texera.amber.core.executor.CoreExecutorReflectionSpec org.apache.texera.amber.util.VirtualIdentityUtilsSpec org.apache.texera.service.util.S3StorageClientSpec"
sbt "$WUNUSED" "WorkflowOperator/testOnly org.apache.texera.amber.operator.TestOperatorsSpec org.apache.texera.amber.operator.dictionary.DictionaryMatcherOpExecSpec org.apache.texera.amber.operator.hashJoin.HashJoinOpSpec org.apache.texera.amber.operator.intervalJoin.IntervalOpExecSpec org.apache.texera.amber.operator.source.fetcher.URLFetchUtilSpec org.apache.texera.amber.operator.source.fetcher.URLFetcherOpExecSpec org.apache.texera.amber.operator.source.scan.csv.CSVScanSourceOpDescSpec org.apache.texera.amber.operator.source.scan.csv.CSVScanSourceOpExecSpec org.apache.texera.amber.operator.source.sql.* org.apache.texera.amber.operator.visualization.htmlviz.HtmlVizOpDescSpec org.apache.texera.amber.util.python.PythonWorkerPoolSpec"
sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.amber.clustering.ClusterListenerSpec org.apache.texera.amber.engine.architecture.messaginglayer.DeadLetterMonitorActorSpec org.apache.texera.amber.engine.architecture.worker.DPThreadSpec org.apache.texera.amber.engine.common.UtilsSpec org.apache.texera.amber.engine.common.storage.SequentialRecordStorageSpec org.apache.texera.web.ComputingUnitMasterSpec org.apache.texera.web.ComputingUnitWorkerSpec org.apache.texera.web.WebsocketInputSpec org.apache.texera.web.resource.WorkflowWebsocketResourceSpec org.apache.texera.web.resource.aiassistant.AiAssistantManagerSpec org.apache.texera.web.resource.auth.ExternalAuthProvisionerSpec"
sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.web.TexeraWebApplicationSpec org.apache.texera.web.resource.GmailResourceSpec org.apache.texera.web.resource.auth.AuthResourceSpec org.apache.texera.web.resource.auth.ExternalAuthProvisionerSpec org.apache.texera.web.resource.auth.OrcidAuthResourceSpec org.apache.texera.web.resource.dashboard.DashboardResourceSpec org.apache.texera.web.resource.dashboard.DatasetSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.ModelSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.UnifiedResourceSchemaSpec org.apache.texera.web.resource.dashboard.VersionedResourceTablesSpec org.apache.texera.web.resource.dashboard.WorkflowSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.admin.user.AdminUserResourceSpec org.apache.texera.web.resource.dashboard.file.DatasetResourceSpec org.apache.texera.web.resource.dashboard.file.WorkflowResourceSpec org.apache.texera.web.resource.dashboard.hub.EntityTablesSpec org.apache.texera.web.resource.dashboard.hub.HubEntityModelSpec org.apache.texera.web.resource.dashboard.hub.HubResourceSpec org.apache.texera.web.resource.dashboard.user.UserResourceSpec org.apache.texera.web.resource.dashboard.user.workflow.WorkflowPublishSpec org.apache.texera.web.service.WorkflowEmailNotifierSpec"
STORAGE_ICEBERG_CATALOG_TYPE=hadoop sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.e2e.DataProcessingSpec -- -z headerlessMultiLineDataCsv"
sbt "$WUNUSED" Observability/test NotebookMigrationService/test "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.scan.*"
sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.architecture.coordinator.promisehandlers.ConsoleMessageHandlerSpec org.apache.texera.amber.engine.architecture.messaginglayer.WorkerTimerServiceSpec org.apache.texera.amber.engine.architecture.worker.DPThreadSpec org.apache.texera.amber.engine.architecture.worker.DataProcessorRPCHandlerInitializerSpec org.apache.texera.amber.engine.architecture.worker.DataProcessorSpec org.apache.texera.amber.engine.architecture.worker.WorkerSpec org.apache.texera.amber.engine.architecture.worker.WorkflowWorkerSpec org.apache.texera.amber.engine.architecture.worker.managers.StatisticsManagerSpec org.apache.texera.amber.engine.architecture.worker.managers.WorkerManagersSpec org.apache.texera.amber.engine.architecture.worker.promisehandlers.EndChannelHandlerSpec org.apache.texera.amber.engine.architecture.worker.promisehandlers.EndHandlerSpec org.apache.texera.amber.engine.architecture.worker.promisehandlers.FinalizeCheckpointHandlerSpec org.apache.texera.amber.engine.architecture.worker.promisehandlers.StartChannelHandlerSpec org.apache.texera.amber.engine.architecture.worker.promisehandlers.StartHandlerSpec org.apache.texera.amber.engine.common.UtilsSpec org.apache.texera.amber.engine.faulttolerance.CheckpointSpec org.apache.texera.web.observability.WorkflowMetricsRecorderSpec"
sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.web.resource.dashboard.DatasetSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.DashboardResourceSpec org.apache.texera.web.resource.dashboard.admin.user.AdminUserResourceSpec org.apache.texera.web.resource.dashboard.hub.HubResourceSpec org.apache.texera.web.ComputingUnitMasterSpec org.apache.texera.web.ComputingUnitWorkerSpec"
sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.web.resource.dashboard.DatasetSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.ModelSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.VersionedResourceTablesSpec org.apache.texera.web.resource.dashboard.DashboardResourceSpec org.apache.texera.web.resource.dashboard.hub.EntityTablesSpec org.apache.texera.web.resource.dashboard.hub.HubEntityModelSpec org.apache.texera.web.resource.dashboard.hub.HubResourceSpec"
sbt WorkflowCore/scalafmtCheckAll WorkflowOperator/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll Observability/scalafmtCheckAll NotebookMigrationService/scalafmtCheckAll "WorkflowCore/scalafixAll --check" "WorkflowOperator/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check" "Observability/scalafixAll --check" "NotebookMigrationService/scalafixAll --check"
  • JUnit XML, compared per test:
    • First commit: the first three test commands and the e2e case run 36 suites that load every file the commit changes, and SQLSourceOpExecSpec calls fetchBatchByBoundary for each numeric type through a mocked JDBC result. All 554 tests pass on main and all 553 with the commit. Each test has the same outcome as on main; the missing one is the removed asterixDBSourceOpDesc case.
    • Second commit: the fourth command runs the 20 suites that load the account, notification, dashboard-search and Hub code, against an embedded PostgreSQL. All 525 tests pass before and after the commit, each with the same outcome.
    • Third commit: the sixth and seventh test commands run every Observability, NotebookMigrationService and scan-source suite, plus the worker, statistics, checkpoint and telemetry suites that load the changed classes. Before and after it, 581 of the 595 tests in these 48 suites pass, each with the same outcome. The other 14 fail on both sides on this machine: 13 ParquetScanSourceOpDescSpec cases need Hadoop's Windows binaries, and one FileScanSourceOpDescSpec case hits a Windows temp-file lock.
    • Fourth commit: the eighth test command runs the six suites it touches. All 179 tests pass, the three new ones included.
    • Fifth commit: the ninth test command runs the seven suites that load VersionedResourceTables or the Hub query. All 182 tests pass.
    • On the second commit's head, all 55 suites of the first two rounds pass, the e2e case included: 1,059 tests.
  • S3StorageClientSpec runs its 34 cases against RustFS 1.0.0 in Testcontainers on both sides. They include a 6 MiB upload (a 5 MiB part and a 1 MiB tail) that downloads back byte for byte, an empty upload, and the abort when the input stream fails after the first part.
  • With the fixture pointed back at country_sales_headerless_small.csv, the strengthened CSVScanSourceOpDescSpec case fails: row 8 reads Republic of the Congo instead of Republic,of,the,Congo. The DataProcessingSpec case runs the multi-line file through the engine and gets the same 100 rows that the single-line file gives on main.
  • scalafmt and scalafix pass on all five touched modules.
  • With -Wunused:patvars,params,privates, the compiler reports 26 unused names in the files of the first commit on main. That commit removes 24 of them. The other two are config and cr, which the @OnOpen and @OnClose methods of WorkflowWebsocketResource need for the WebSocket API's signatures; they are reported on both.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

Unused pattern, catch and callback bindings become `_`, test helpers drop
parameters and defaults no caller passes, and TestOperators drops the
AsterixDB descriptor only its own spec built and the multiLine parameter
getCsvScanOpDesc never read. The headerless multi-line CSV fixture reads
the multi-line file again, and CSVScanSourceOpDescSpec's multi-line case
now reads it too and checks the scanned rows. S3StorageClient.uploadObject
copies each part once instead of twice and uploads the parts in a plain
loop, and fetchBatchByBoundary returns a val.
Copilot AI balanced review requested due to automatic review settings November 25, 2026 01:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added engine refactor Refactor the code common labels Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Committers with relevant context: @parshimers
    You can request their reviews formally with /request-review @parshimers.

  • Contributors with relevant context: @tanishqgandhi1908, @Ma77Ball, @Yicong-Huang
    You can notify them by mentioning @tanishqgandhi1908, @Ma77Ball, @Yicong-Huang in a comment.

@codecov-commenter

codecov-commenter commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.69565% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.74%. Comparing base (d335251) to head (468ca51).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...era/web/resource/dashboard/DashboardResource.scala 42.85% 0 Missing and 8 partials ⚠️
...org/apache/texera/web/resource/GmailResource.scala 88.88% 2 Missing ⚠️
...ache/texera/amber/clustering/ClusterListener.scala 50.00% 0 Missing and 1 partial ⚠️
...ource/dashboard/admin/user/AdminUserResource.scala 83.33% 0 Missing and 1 partial ⚠️
...exera/web/resource/dashboard/hub/HubResource.scala 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9681      +/-   ##
============================================
+ Coverage     91.71%   91.74%   +0.03%     
- Complexity     5133     5135       +2     
============================================
  Files          1305     1305              
  Lines         58203    58173      -30     
  Branches       7598     7590       -8     
============================================
- Hits          53379    53370       -9     
+ Misses         2920     2906      -14     
+ Partials       1904     1897       -7     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø)
agent-service 99.56% <ø> (ø) Carriedforward from 4c24483
amber 85.87% <87.73%> (+0.09%) ⬆️
computing-unit-managing-service 63.81% <ø> (ø)
config-service 87.50% <ø> (ø)
file-service 82.16% <ø> (ø)
frontend 96.44% <ø> (-0.01%) ⬇️ Carriedforward from 4c24483
notebook-migration-service 83.84% <100.00%> (+0.07%) ⬆️
pyamber 98.59% <ø> (+0.01%) ⬆️ Carriedforward from 4c24483
result-service 86.48% <ø> (ø)
workflow-compiling-service 80.90% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 4 better · 🔴 5 worse · ⚪ 6 noise (<±5%) · 0 without baseline

Compared against main d335251 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 570 0.348 17,368/19,785/19,785 us 🟢 -15.2% / 🔴 +57.7%
🟢 bs=100 sw=10 sl=64 1,272 0.777 78,509/92,039/92,039 us 🟢 -7.9% / 🟢 -12.1%
🔴 bs=1000 sw=10 sl=64 1,466 0.895 675,393/801,033/801,033 us 🔴 +11.4% / 🟢 +20.3%
Baseline details

Latest main d335251 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 570 tuples/sec 615 tuples/sec 900.3 tuples/sec -7.3% -36.7%
bs=10 sw=10 sl=64 MB/s 0.348 MB/s 0.376 MB/s 0.549 MB/s -7.4% -36.7%
bs=10 sw=10 sl=64 p50 17,368 us 16,315 us 11,014 us +6.5% +57.7%
bs=10 sw=10 sl=64 p95 19,785 us 23,331 us 14,189 us -15.2% +39.4%
bs=10 sw=10 sl=64 p99 19,785 us 23,331 us 17,391 us -15.2% +13.8%
bs=100 sw=10 sl=64 throughput 1,272 tuples/sec 1,273 tuples/sec 1,187 tuples/sec -0.1% +7.2%
bs=100 sw=10 sl=64 MB/s 0.777 MB/s 0.777 MB/s 0.724 MB/s 0.0% +7.3%
bs=100 sw=10 sl=64 p50 78,509 us 75,001 us 86,789 us +4.7% -9.5%
bs=100 sw=10 sl=64 p95 92,039 us 99,941 us 94,657 us -7.9% -2.8%
bs=100 sw=10 sl=64 p99 92,039 us 99,941 us 104,753 us -7.9% -12.1%
bs=1000 sw=10 sl=64 throughput 1,466 tuples/sec 1,459 tuples/sec 1,219 tuples/sec +0.5% +20.3%
bs=1000 sw=10 sl=64 MB/s 0.895 MB/s 0.89 MB/s 0.744 MB/s +0.6% +20.3%
bs=1000 sw=10 sl=64 p50 675,393 us 687,822 us 846,616 us -1.8% -20.2%
bs=1000 sw=10 sl=64 p95 801,033 us 718,862 us 887,594 us +11.4% -9.8%
bs=1000 sw=10 sl=64 p99 801,033 us 718,862 us 940,017 us +11.4% -14.8%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,350.76,200,128000,570,0.348,17368.29,19784.61,19784.61
1,100,10,64,20,1571.77,2000,1280000,1272,0.777,78509.33,92039.18,92039.18
2,1000,10,64,20,13643.76,20000,12800000,1466,0.895,675392.61,801032.83,801032.83

@aglinxinyuan
aglinxinyuan requested a review from kunwp1 November 25, 2026 01:52
Account, login and notification lookups select only the columns they
read. GmailResource compiles its email regex once and stops copying the
message to add the domain. Dashboard search builds its results in one
pass, drops order-field branches its regex makes unreachable and a
group-by override that repeats the default, and
VersionedResourceTables.hydrate drops the resource ID every caller
discarded. HubResource checks likes and clones with existence queries,
collects liked IDs with fetchSet and reuses its per-type request groups.
@aglinxinyuan aglinxinyuan changed the title refactor(amber, common): remove unused bindings and fixtures refactor(amber, common): drop unused code and narrow queries Nov 25, 2026
StatisticsManager.getStatistics drops the executor parameter it has not
read since the sink-operator check went away. WorkflowMetricsRecorder
drops a logger it never uses, WorkflowMetrics drops the Cancelled outcome
and Unknown workflow kind nothing records, SkippedRowReporter drops its
uncalled count, and ArrowSourceOpExec drops a batch counter it only
increments. The Arrow Flight benchmark sorts each run's latencies once.
NotebookMigrationResource stops selecting the unread notebook ID and the
JSONB casts, and the Jupyter endpoint lookup selects the two registration
URLs instead of a full row and derives a healthy registration's token once.
@aglinxinyuan aglinxinyuan changed the title refactor(amber, common): drop unused code and narrow queries refactor: drop unused code and narrow queries Nov 25, 2026
@github-actions github-actions Bot added the platform Non-amber Scala service paths label Nov 25, 2026
DatasetSearchQueryBuilderSpec runs a dataset search over a dataset lakeFS
rejects and expects it left out with hasMismatch set, HubResourceSpec
fetches such a dataset by ID and expects it dropped, and
AdminUserResourceSpec moves a user to an address no other account uses.
Both computing-unit argument parsers end in `case _`, since `case Nil`
already takes the empty list.

@kunwp1 kunwp1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! One optional suggestion below.

VersionedResourceTables.hydrationFields lists every column hydrate reads:
the resource's own columns, the owner's email and the viewer's
privilege. The Hub's by-ID query selects it instead of spelling the
list out, since a query that left a column out would get a null email
or privilege without an error.
@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Nov 25, 2026
Merged via the queue into apache:main with commit 364786a Nov 25, 2026
39 checks passed
@aglinxinyuan
aglinxinyuan deleted the refactor/scala-unused-bindings-fixtures branch November 25, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common engine platform Non-amber Scala service paths refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unused Scala code and narrow database reads

4 participants