Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: publish duckdb module #362

Merged
merged 1 commit into from
May 21, 2024
Merged

feat: publish duckdb module #362

merged 1 commit into from
May 21, 2024

Conversation

islxyqwe
Copy link
Contributor

@islxyqwe islxyqwe commented Apr 3, 2024

add a action to publish duckdb module.

Copy link

vercel bot commented Apr 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
graphic-walker ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2024 7:24am

Copy link
Contributor

github-actions bot commented Apr 3, 2024

Risk Level 2 - /home/runner/work/graphic-walker/graphic-walker/packages/duckdb-wasm-computation/src/index.ts

The code seems to be well written and follows the SOLID principles. However, there are a few areas that could be improved for better readability and maintainability:

  1. Error Handling: The code lacks proper error handling. For example, in the getMemoryProvider function, if the datasetId is not found in the metaDict or specDict, an error is thrown. It would be better to handle these errors gracefully and provide a more descriptive error message.

  2. Use of any type: The use of any type in TypeScript should be avoided as it defeats the purpose of using TypeScript, which is to provide static type checking. For example, in the ArrowToJSON function, the parameter v is of type any. It would be better to provide a more specific type if possible.

  3. Logging in Production: The code contains console.log statements which are executed when the environment is not production. It's a good practice to have a proper logging mechanism in place and avoid using console.log, especially in production code.

Here is an example of how you can improve error handling:

async getMeta(datasetId) {
    const meta = metaDict.get(datasetId);
    if (!meta) {
        // Provide a more descriptive error message
        throw new Error(`Cannot find meta for datasetId: ${datasetId}`);
    }
    return meta;
}

And here is how you can avoid using any type:

const ArrowToJSON = (v: Vector | bigint | object): any => {
    // rest of the code
};

🚫💻🔍


Powered by Code Review GPT

@islxyqwe islxyqwe merged commit f5e805a into main May 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants