René's URL Explorer Experiment


Title: feat(dataframe): add schema, explain, cache, and describe introspection methods by LantaoJin · Pull Request #71 · apache/datafusion-java · GitHub

Open Graph Title: feat(dataframe): add schema, explain, cache, and describe introspection methods by LantaoJin · Pull Request #71 · apache/datafusion-java

X Title: feat(dataframe): add schema, explain, cache, and describe introspection methods by LantaoJin · Pull Request #71 · apache/datafusion-java

Description: Which issue does this PR close? Closes #45 . Rationale for this change DataFrame introspection in the Java binding is limited to count(), show(), and show(int). Java callers cannot programmatically retrieve a DataFrame's Arrow schema, inspect its query plan, materialise an intermediate result, or compute summary statistics — capabilities that DataFusion's Rust API has surfaced for years (df.schema(), df.explain(verbose, analyze), df.cache().await, df.describe().await). The issue groups these four as a coherent introspection surface; their JNI plumbing is structurally identical (one df.clone() plus one upstream call), so shipping them together is the smallest reasonable PR. schema() and explain() are non-consuming and cheap — they just inspect the logical plan. cache() and describe() execute the plan eagerly, but the cost is paid by the caller's choice to invoke them; the Java API surface is the same shape as the cheap pair. What changes are included in this PR? DataFrame.schema() → Schema — returns the Arrow schema via the existing IPC byte channel (mirrors SessionContext.tableSchema). No BufferAllocator required because schemas carry no buffer data. DataFrame.explain(boolean verbose, boolean analyze) → DataFrame — wraps upstream's two-flag df.explain. The result is a lazy DataFrame whose batches contain the plan-type label and plan text; render via show() or collect(). DataFrame.cache() → DataFrame — wraps df.cache().await. Materialises the plan into an in-memory table and returns a new DataFrame that scans it. DataFrame.describe() → DataFrame — wraps df.describe().await. DataFusion runs seven aggregate sub-plans (count, null_count, mean, std, min, max, median) to build the summary table. All four are non-consuming on the Java side: the receiver remains usable and must still be closed independently. This matches the convention already used by select / filter / withColumn / unnestColumns. Upstream takes self for explain / cache / describe, but the JNI layer clones the underlying Arc-backed DataFrame like every other transformation method. All four guard against use after close() with the same IllegalStateException message used by every other DataFrame method. Native side (native/src/lib.rs): Java_org_apache_datafusion_DataFrame_schemaIpc — non-consuming, returns Arrow IPC bytes via StreamWriter. Java_org_apache_datafusion_DataFrame_explainPlan — non-consuming, runs df.clone().explain(verbose, analyze)? (sync upstream). Java_org_apache_datafusion_DataFrame_cachePlan — non-consuming, runs runtime().block_on(df.clone().cache()). Java_org_apache_datafusion_DataFrame_describePlan — non-consuming, runs runtime().block_on(df.clone().describe()). All four use the standard try_unwrap_or_throw(...) envelope so panics and Err surface as Java exceptions. Out of scope (for follow-ups): explain_with_options(ExplainOption) — the typed-options variant exposes ExplainFormat::Json / Tree and per-context filters. Easy to add later as explain(ExplainOptions) once anyone files a follow-up; the issue asks for the two-boolean form. DataFrame.logicalPlan() / optimizedPlan() / physicalPlan() — Java mirrors of upstream's plan getters. Not in scope for #45. Cache-factory wiring — upstream's SessionState::cache_factory() lets users plug in alternative cache backends. This PR always uses the default MemTable path; pluggable cache factories belong on a separate config surface. Column-filtered describe() — upstream has no API for this. Callers who need it can df.select(...).describe(). Are these changes tested? Yes, 13 new tests in core/src/test/java/org/apache/datafusion/DataFrameIntrospectionTest.java Are there any user-facing changes? Yes, purely additive. New public API: DataFrame.schema() DataFrame.explain(boolean, boolean) DataFrame.cache() DataFrame.describe() No API removals, no deprecations, no behavior change for existing callers. The native binary is unchanged in size (no new Cargo features or dependencies).

Open Graph Description: Which issue does this PR close? Closes #45 . Rationale for this change DataFrame introspection in the Java binding is limited to count(), show(), and show(int). Java callers cannot programmatical...

X Description: Which issue does this PR close? Closes #45 . Rationale for this change DataFrame introspection in the Java binding is limited to count(), show(), and show(int). Java callers cannot programmatical...

Opengraph URL: https://github.com/apache/datafusion-java/pull/71

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:bd31f32f-b0cc-d3c9-89e3-cc51a28ac37c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id98DE:171D41:2870FB:38C3B6:6B046A38
html-safe-nonceb2db773552af8e95c75b3f01bd4210f0ead8904a677d4fae9b8b2df1996e7a58
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OERFOjE3MUQ0MToyODcwRkI6MzhDM0I2OjZCMDQ2QTM4IiwidmlzaXRvcl9pZCI6IjMyMzYzODIxNjQyNzQ5MzIyODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaced7dde0cd863143c5db5b4d3d4693e55f9eec5a7a8f33376661b9a493f21a267
hovercard-subject-tagpull_request:3714517789
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/apache/datafusion-java/pull/71/files
twitter:imagehttps://avatars.githubusercontent.com/u/1853780?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1853780?s=400&v=4
og:image:altWhich issue does this PR close? Closes #45 . Rationale for this change DataFrame introspection in the Java binding is limited to count(), show(), and show(int). Java callers cannot programmatical...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/apache/datafusion-java git https://github.com/apache/datafusion-java.git
octolytics-dimension-user_id47359
octolytics-dimension-user_loginapache
octolytics-dimension-repository_id1237105117
octolytics-dimension-repository_nwoapache/datafusion-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1237105117
octolytics-dimension-repository_network_root_nwoapache/datafusion-java
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseca4d07a7cef4e4b75f821dc25e7300d80c1450a9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/apache/datafusion-java/pull/71/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fdatafusion-java%2Fpull%2F71%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fdatafusion-java%2Fpull%2F71%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=apache%2Fdatafusion-java
Reloadhttps://github.com/apache/datafusion-java/pull/71/files
Reloadhttps://github.com/apache/datafusion-java/pull/71/files
Reloadhttps://github.com/apache/datafusion-java/pull/71/files
apachehttps://github.com/apache
datafusion-javahttps://github.com/apache/datafusion-java
Codehttps://github.com/apache/datafusion-java
Issues10 (10)https://github.com/apache/datafusion-java/issues
Pull requests10 (10)https://github.com/apache/datafusion-java/pulls
Discussionshttps://github.com/apache/datafusion-java/discussions
Actionshttps://github.com/apache/datafusion-java/actions
Security and qualityhttps://github.com/apache/datafusion-java/security
Insightshttps://github.com/apache/datafusion-java/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fapache%2Fdatafusion-java%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fapache%2Fdatafusion-java%2Fissues%2Fnew%2Fchoose
andygrovehttps://github.com/andygrove
apache:mainhttps://github.com/apache/datafusion-java/tree/main
LantaoJin:feat/dataframe-introspectionhttps://github.com/LantaoJin/datafusion-java/tree/feat/dataframe-introspection
Conversation 1 https://github.com/apache/datafusion-java/pull/71
Commits 1 https://github.com/apache/datafusion-java/pull/71/commits
Checks 1 https://github.com/apache/datafusion-java/pull/71/checks
Files changed https://github.com/apache/datafusion-java/pull/71/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/71/files
feat(dataframe): add schema, explain, cache, and describe introspection methods https://github.com/apache/datafusion-java/pull/71/files#top
Show all changes 1 commit https://github.com/apache/datafusion-java/pull/71/files
6e05e35 feat(dataframe): add schema, explain, cache, and describe introspecti… LantaoJin May 20, 2026 https://github.com/apache/datafusion-java/pull/71/commits/6e05e35d9eb886068bb9ad16d738f995c3f12644
Clear filters https://github.com/apache/datafusion-java/pull/71/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/71/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/71/files
DataFrame.java https://github.com/apache/datafusion-java/pull/71/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
DataFrameIntrospectionTest.java https://github.com/apache/datafusion-java/pull/71/files#diff-9f1ebf1516c813e97778c6517f840be9a3c4a6a78a34e4032107ecc0e6ad3258
lib.rs https://github.com/apache/datafusion-java/pull/71/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
core/src/main/java/org/apache/datafusion/DataFrame.javahttps://github.com/apache/datafusion-java/pull/71/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
View file https://github.com/LantaoJin/datafusion-java/blob/6e05e35d9eb886068bb9ad16d738f995c3f12644/core/src/main/java/org/apache/datafusion/DataFrame.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/71/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/71/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
https://github.com/apache/datafusion-java/pull/71/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
https://github.com/apache/datafusion-java/pull/71/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
https://github.com/apache/datafusion-java/pull/71/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
https://github.com/apache/datafusion-java/pull/71/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
https://github.com/apache/datafusion-java/pull/71/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
core/src/test/java/org/apache/datafusion/DataFrameIntrospectionTest.javahttps://github.com/apache/datafusion-java/pull/71/files#diff-9f1ebf1516c813e97778c6517f840be9a3c4a6a78a34e4032107ecc0e6ad3258
View file https://github.com/LantaoJin/datafusion-java/blob/6e05e35d9eb886068bb9ad16d738f995c3f12644/core/src/test/java/org/apache/datafusion/DataFrameIntrospectionTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/71/{{ revealButtonHref }}
Please reload this pagehttps://github.com/apache/datafusion-java/pull/71/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/71/files
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.