Skip to content

Commit 0da0d51

Browse files
authored
Merge pull request #256 from Canner/fix/cache-layer-found-canner-driver-parquet
Fix: Rename the downloaded parquet file to add parquet extension
2 parents 8df12be + 4b2d5db commit 0da0d51

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

labs/playground1/Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ start: build test-data/moma.db ../../node_modules
66
@vulcan start
77

88
# build the required packages
9-
build: pkg-core pkg-build pkg-serve pkg-catalog-server pkg-cli pkg-extension-driver-duckdb pkg-extension-authenticator-canner pkg-extension-driver-clickhouse pkg-extension-huggingface
9+
build: pkg-core pkg-build pkg-serve pkg-catalog-server pkg-cli pkg-extension-driver-duckdb pkg-extension-authenticator-canner pkg-extension-driver-canner pkg-extension-driver-clickhouse pkg-extension-huggingface
1010

1111

1212
# build for core pakge
@@ -56,6 +56,13 @@ pkg-extension-authenticator-canner: ../../node_modules
5656
rm -rf ./labs/playground1/node_modules/@vulcan-sql/extension-authenticator-canner; \
5757
cp -R ./dist/packages/extension-authenticator-canner ./labs/playground1/node_modules/@vulcan-sql
5858

59+
pkg-extension-driver-canner: ../../node_modules
60+
@cd ../..; \
61+
yarn nx build extension-driver-canner; \
62+
mkdir -p ./labs/playground1/node_modules/@vulcan-sql; \
63+
rm -rf ./labs/playground1/node_modules/@vulcan-sql/extension-driver-canner; \
64+
cp -R ./dist/packages/extension-driver-canner ./labs/playground1/node_modules/@vulcan-sql; \
65+
5966
pkg-extension-driver-clickhouse: ../../node_modules
6067
@cd ../..; \
6168
yarn nx build extension-driver-clickhouse; \
@@ -72,6 +79,9 @@ pkg-extension-huggingface: ../../node_modules
7279
cp -R ./dist/packages/extension-huggingface ./labs/playground1/node_modules/@vulcan-sql; \
7380
cp -R ./packages/extension-huggingface/node_modules ./labs/playground1
7481

82+
83+
84+
7585
# build and install for cli pakge
7686
pkg-cli: ../../node_modules
7787
@cd ../..; \

labs/playground1/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ This project contains these resources for testing your development:
1010
## Install
1111

1212
```bash
13-
cd ./lab/playground1
14-
make
13+
$ cd ./lab/playground1
14+
$ yarn
15+
$ make
1516
```
1617

1718
- This command installs VulcanSQL CLI too, you can use `vulcan start` instead of `make` if the source codes aren’t changed.
@@ -22,4 +23,4 @@ After installation, you can find `artists.csv` and `artworks.csv` under folder `
2223

2324
## Examples
2425

25-
We provide some examples in the `examples` folder to show how to configured your Vulcan API
26+
We provide some examples in the `examples` folder to show how to configured your Vulcan API

packages/extension-driver-canner/src/lib/cannerDataSource.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ export class CannerDataSource extends DataSource<any, PGOptions> {
9292
// ex: https://cannerHost/data/canner/somePath/file-name?X-Amz-Algorithm=AWS4-HMAC-SHA256
9393
const fileName = url.split('/').pop()?.split('?')[0] || `part${index}`;
9494
const writeStream = fs.createWriteStream(
95-
path.join(directory, fileName)
95+
// rename to parquet extension to make cache layer could read
96+
path.join(directory, `${fileName}.parquet`)
9697
);
9798
response.data.pipe(writeStream);
9899
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)