René's URL Explorer Experiment


Title: reader: ScanIterator.compareValues swallows ClassCastException, silently disabling zone-map pruning on type-mismatched filters · Issue #159 · dfa1/vortex-java · GitHub

Open Graph Title: reader: ScanIterator.compareValues swallows ClassCastException, silently disabling zone-map pruning on type-mismatched filters · Issue #159 · dfa1/vortex-java

X Title: reader: ScanIterator.compareValues swallows ClassCastException, silently disabling zone-map pruning on type-mismatched filters · Issue #159 · dfa1/vortex-java

Description: Summary ScanIterator.compareValues(Object a, Object b) catches ClassCastException and returns 0. Because the canPruneChunk arms treat compareValues(...) < 0 / > 0 as the prune condition, a 0 means "cannot prune" — so a filter whose value...

Open Graph Description: Summary ScanIterator.compareValues(Object a, Object b) catches ClassCastException and returns 0. Because the canPruneChunk arms treat compareValues(...) < 0 / > 0 as the prune condition, a 0 means ...

X Description: Summary ScanIterator.compareValues(Object a, Object b) catches ClassCastException and returns 0. Because the canPruneChunk arms treat compareValues(...) < 0 / > 0 as the prune condition, a 0 ...

Opengraph URL: https://github.com/dfa1/vortex-java/issues/159

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"reader: ScanIterator.compareValues swallows ClassCastException, silently disabling zone-map pruning on type-mismatched filters","articleBody":"## Summary\n\n`ScanIterator.compareValues(Object a, Object b)` catches `ClassCastException` and returns `0`. Because the `canPruneChunk` arms treat `compareValues(...) \u003c 0` / `\u003e 0` as the prune condition, a `0` means **\"cannot prune\"** — so a filter whose value type does not match the stored zone-map stat type silently prunes **nothing** and the whole column is decoded. No error, no log: a correctness-safe but performance-silent failure.\n\n## Where\n\n`reader/src/main/java/io/github/dfa1/vortex/reader/ScanIterator.java`\n\n```java\nprivate static int compareValues(Object a, Object b) {\n    try {\n        return ((Comparable\u003cObject\u003e) a).compareTo(b);\n    } catch (ClassCastException _) {\n        return 0;   // \u003c-- mismatch =\u003e 0 =\u003e canPruneChunk yields false =\u003e no pruning\n    }\n}\n```\n\nInteger zone stats decode as `Long` (`ArrayStats.decodeScalar` returns `int64_value()`), and floats as `Double`. So a caller that builds a `RowFilter` with an `Integer` (or `Float`) value against an integer (or f32) column gets **zero pruning** even though the predicate is perfectly valid — the comparator just throws `ClassCastException` internally and is swallowed.\n\n## How it surfaced\n\nBuilding the Calcite adapter's filter push-down (`feat/vortex-calcite-demo`), a `WHERE date BETWEEN ...` on an `I32` column pruned **0 of 100** chunks until the literal was coerced from `Integer` to `Long`. The filter, expansion, and `canPruneChunk` path were all correct — only the boxed type differed, and the swallow hid it.\n\n## Impact\n\n- Silent performance cliff: a valid, selective filter degrades to a full scan with no signal.\n- Easy to hit from any caller that boxes filter values at the column's \"natural\" width (`Integer` for `I32`, `Float` for `F32`) rather than the stat's storage width (`Long` / `Double`).\n\n## Suggested fix (pick one)\n\n1. **Normalise numeric comparison** in `compareValues` — if both args are `Number` but different boxed types, compare via `Long`/`Double` (or `BigDecimal`) instead of returning `0`. Most robust; makes pruning width-agnostic.\n2. **Coerce on `RowFilter` construction** — normalise integer values to `Long` and float values to `Double` when a `RowFilter` is built, matching the stat storage types.\n3. At minimum, **do not return `0` on mismatch** — a genuine type mismatch (e.g. comparing a string filter to a numeric column) should be a clear error or a logged \"pruning skipped\", not a silent no-op.\n\nOption 1 is preferred: it fixes every caller, not just the careful ones.\n\n## Notes\n\nThe Calcite adapter worked around this by coercing integer literals to `Long` (commit on `feat/vortex-calcite-demo`), so it is unblocked — but the underlying reader trap should be fixed so the next caller does not rediscover it.","author":{"url":"https://github.com/dfa1","@type":"Person","name":"dfa1"},"datePublished":"2026-06-24T19:59:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/159/vortex-java/issues/159"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3e56898d-1bc6-f806-30c6-1a8eb554e60e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB656:C61B2:23655A8:3305D50:6A4D12D2
html-safe-nonceb6e4b188033dff901526fb14b92ad97982e1d115ecf9cfd3334afaedf4414ba8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjU2OkM2MUIyOjIzNjU1QTg6MzMwNUQ1MDo2QTREMTJEMiIsInZpc2l0b3JfaWQiOiI2MzcwNTE2ODQ0OTQwMTY5OTM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc1aff3e51815964a38ee6861af410b95a43984bf859ea69b9831087b05f662bc
hovercard-subject-tagissue:4737989586
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/dfa1/vortex-java/159/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8b7b7f98aa26f7f6836e9a9fbf07ca03cc845b69d47f079d6f4da9243015ead9/dfa1/vortex-java/issues/159
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8b7b7f98aa26f7f6836e9a9fbf07ca03cc845b69d47f079d6f4da9243015ead9/dfa1/vortex-java/issues/159
og:image:altSummary ScanIterator.compareValues(Object a, Object b) catches ClassCastException and returns 0. Because the canPruneChunk arms treat compareValues(...) < 0 / > 0 as the prune condition, a 0 means ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedfa1
hostnamegithub.com
expected-hostnamegithub.com
Nonef02420044fa3730a0607f4a52546bdd73f5ae60187ef57d284ecb6d7f3f1d880
turbo-cache-controlno-preview
go-importgithub.com/dfa1/vortex-java git https://github.com/dfa1/vortex-java.git
octolytics-dimension-user_id5798698
octolytics-dimension-user_logindfa1
octolytics-dimension-repository_id1249412947
octolytics-dimension-repository_nwodfa1/vortex-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1249412947
octolytics-dimension-repository_network_root_nwodfa1/vortex-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef0b6a62c1f0be1086cb0b5b077b82cebe520eb42
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/dfa1/vortex-java/issues/159#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdfa1%2Fvortex-java%2Fissues%2F159
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdfa1%2Fvortex-java%2Fissues%2F159
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=dfa1%2Fvortex-java
Reloadhttps://github.com/dfa1/vortex-java/issues/159
Reloadhttps://github.com/dfa1/vortex-java/issues/159
Reloadhttps://github.com/dfa1/vortex-java/issues/159
dfa1 https://github.com/dfa1
vortex-javahttps://github.com/dfa1/vortex-java
Notifications https://github.com/login?return_to=%2Fdfa1%2Fvortex-java
Fork 1 https://github.com/login?return_to=%2Fdfa1%2Fvortex-java
Star 3 https://github.com/login?return_to=%2Fdfa1%2Fvortex-java
Code https://github.com/dfa1/vortex-java
Issues 3 https://github.com/dfa1/vortex-java/issues
Pull requests 3 https://github.com/dfa1/vortex-java/pulls
Discussions https://github.com/dfa1/vortex-java/discussions
Actions https://github.com/dfa1/vortex-java/actions
Projects https://github.com/dfa1/vortex-java/projects
Security and quality 0 https://github.com/dfa1/vortex-java/security
Insights https://github.com/dfa1/vortex-java/pulse
Code https://github.com/dfa1/vortex-java
Issues https://github.com/dfa1/vortex-java/issues
Pull requests https://github.com/dfa1/vortex-java/pulls
Discussions https://github.com/dfa1/vortex-java/discussions
Actions https://github.com/dfa1/vortex-java/actions
Projects https://github.com/dfa1/vortex-java/projects
Security and quality https://github.com/dfa1/vortex-java/security
Insights https://github.com/dfa1/vortex-java/pulse
#160https://github.com/dfa1/vortex-java/pull/160
reader: ScanIterator.compareValues swallows ClassCastException, silently disabling zone-map pruning on type-mismatched filtershttps://github.com/dfa1/vortex-java/issues/159#top
#160https://github.com/dfa1/vortex-java/pull/160
https://github.com/dfa1
dfa1https://github.com/dfa1
on Jun 24, 2026https://github.com/dfa1/vortex-java/issues/159#issue-4737989586
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.