-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into role_parameters
- Loading branch information
Showing
43 changed files
with
2,552 additions
and
177 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' | ||
directory: '.github/workflows' | ||
schedule: | ||
interval: 'weekly' | ||
day: 'monday' | ||
groups: | ||
workflows: | ||
dependency-type: 'development' | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' | ||
day: 'monday' | ||
groups: | ||
dev-dependencies: | ||
dependency-type: 'development' |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { createClient } from '@clickhouse/client' | ||
import { isProgressRow } from '@clickhouse/client-common' | ||
|
||
/** See the format spec - https://clickhouse.com/docs/en/interfaces/formats#jsoneachrowwithprogress | ||
* When JSONEachRowWithProgress format is used in TypeScript, | ||
* the ResultSet should infer the final row type as `{ row: Data } | ProgressRow`. */ | ||
type Data = { number: string } | ||
|
||
void (async () => { | ||
const client = createClient() | ||
const rs = await client.query({ | ||
query: 'SELECT number FROM system.numbers LIMIT 100', | ||
format: 'JSONEachRowWithProgress', | ||
}) | ||
|
||
let totalRows = 0 | ||
let totalProgressRows = 0 | ||
|
||
const stream = rs.stream<Data>() | ||
for await (const rows of stream) { | ||
for (const row of rows) { | ||
const decodedRow = row.json() | ||
if (isProgressRow(decodedRow)) { | ||
console.log('Got a progress row:', decodedRow) | ||
totalProgressRows++ | ||
} else { | ||
totalRows++ | ||
if (totalRows % 100 === 0) { | ||
console.log('Sample row:', decodedRow) | ||
} | ||
} | ||
} | ||
} | ||
|
||
console.log('Total rows:', totalRows) | ||
console.log('Total progress rows:', totalProgressRows) | ||
|
||
await client.close() | ||
})() |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.