mirror of
https://github.com/hanzo-ds/sqlparser.git
synced 2026-10-30 20:53:50 +00:00
This repo was previously a module-path-only rebrand; the CLI, build and docs still described the upstream project. The binary is now sqlparser. Makefile's PKG_FILES sed still stripped the UPSTREAM module prefix, so it matched nothing and left full import paths in the coverage list. main.go dropped its vendor import alias, and the package no longer shadows itself. README described the upstream project end to end: its CI, coverage and report card badges, its install path, and a brew formula we do not publish. Rewritten for this fork, and its Go examples were compiled and run rather than hand written. Fixture content that is merely arbitrary — a greeting string literal and a table name — was renamed, and the golden files REGENERATED with -update rather than edited, because they encode character offsets that shift with the text. Two classes of fixture content are deliberately left alone, and CI records why: ReplicatedMergeTree '/clickhouse/tables/...' ZooKeeper paths are persisted state (our own production server stores replicas under exactly that prefix), and SOURCE(CLICKHOUSE(...)) is a keyword in the server's dictionary grammar that this parser must accept. Renaming either would make the parser reject real SQL.
10 lines
804 B
SQL
10 lines
804 B
SQL
-- Origin SQL:
|
|
INSERT INTO helloworld.my_first_table (user_id, message, timestamp, metric) VALUES
|
|
(101, 'Hello, Datastore!', now(), -1.0 ),
|
|
(102, 'Insert a lot of rows per batch', yesterday(), 1.41421 ),
|
|
(102, 'Sort your data based on your commonly-used queries', today(), 2.718 ),
|
|
(101, 'Granules are the smallest chunks of data read', now() + 5, 3.14159 )
|
|
|
|
-- Format SQL:
|
|
INSERT INTO helloworld.my_first_table (user_id, message, timestamp, metric) VALUES (101, 'Hello, Datastore!', now(), -1.0), (102, 'Insert a lot of rows per batch', yesterday(), 1.41421), (102, 'Sort your data based on your commonly-used queries', today(), 2.718), (101, 'Granules are the smallest chunks of data read', now() + 5, 3.14159);
|