Open the README with a quick start that runs - #33
Closed
ShawnChen-Sirius wants to merge 1 commit into
Closed
ShawnChen-Sirius wants to merge 1 commit into
ShawnChen-Sirius wants to merge 1 commit into
Conversation
The first snippet queried `url('https://example.com/logs.jsonl')`, three lines
below "no server, no network". That URL 404s, so the first thing a reader
copied failed with `Code: 86. RECEIVED_ERROR_FROM_REMOTE_IO_SERVER`. The
snippet was right about what to show — querying JSON with no schema and no
load step is the reason to reach for this driver — and wrong only about where
the JSON came from.
So it keeps its shape: a bound parameter, `JSONEachRow`, an aggregate. The
data is now inline, through `format(JSONEachRow, ?)`, which needs no file and
no network, and it groups rather than counting so the result is visibly the
engine's work and not a JSON parser's. `format()` is also the only variant of
this that runs verbatim out of a README.
Two things nothing else in the README said: that there is no `Class.forName`,
and that `chdb-examples/QuickStart.java` exists — now linked, not just named
in the repository layout table. Everything else stays where it lives: the
platform artifact ids in the support matrix, the coordinates in Installing,
the URL forms in Connecting, the build commands in Building from source. The
dependency is a link to `#installing`, not a second copy of the XML.
Verified against 1.0.0-rc.1 resolved from maven.chdb.io: the block extracted
from README.md verbatim compiles at `-source 11` — a text block would not
have, and the support matrix promises Java 11 — and prints `/ 2`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ShawnChen-Sirius
force-pushed
the
readme/quick-start
branch
from
September 24, 2026 00:09
7d57f49 to
d75e32c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #30, which fixed this and was closed rather than merged; the problem is still on
main.The problem
The README's first code block queries
url('https://example.com/logs.jsonl'), three lines below "no server, no network". That URL 404s, so the first thing a reader copies fails:The snippet was right about what to show — querying JSON with no schema and no load step is the reason to reach for this driver — and wrong only about where the JSON came from.
url()itself is fine; verified against a live endpoint while preparing this.The change
It keeps its shape: a bound parameter,
JSONEachRow, an aggregate. The data moves inline, throughformat(JSONEachRow, ?), which needs no file and no network and is the only variant of this that runs verbatim out of a README. It groups rather than counting, so the result is visibly the engine's work and not a JSON parser's.It also gains a
## Quick startheading, so it is in the anchor list rather than just being the first thing on the page.One line notes that swapping
format(JSONEachRow, ?)forfile(?, …)orurl(?, …)leaves the rest of the query unchanged — the production shape, with nothing that can rot.Deliberately not repeated here, because each already has a home:
jdbc:chdb:URL formsmvn -pl/build-native.shsequenceThe dependency is a link to
#installing, not a second copy of the XML.The two facts nothing else in the README stated: there is no
Class.forName, andchdb-examples/QuickStart.javaexists — now linked, where before it was only named in the repository layout table.Verification
Against
1.0.0-rc.1resolved fromhttps://maven.chdb.iointo a clean local repository, Linux x86_64:README.mdverbatim, wrapped inmain, compiles at-source 11and prints/ 2. A text block would not have compiled there, and the support matrix promises Java 11chdb-native-linux-x86_64-gnu— as Installing says is enough — pulls inchdb-jdbcand runs it: 4.4 s cold, 0.24 s warmfile(?, 'JSONEachRow')andurl(?, 'JSONEachRow'), the two swaps the text offers, both checked against real data rather than asserted🤖 Generated with Claude Code
Note
Rewrite README quick-start with a Java inline-JSON example
Replaces the previous in-memory connection and URL-backed count query in README.md with a Quick start section that supplies inline JSON through a prepared statement, queries it with
format(JSONEachRow, ?), filters successful responses, groups by path, and prints grouped counts. Adds explanatory text for dependency setup, driver registration, engine mapping, alternativefileandurltable functions, and links toQuickStart.javafor more examples.Macroscope summarized d75e32c.