-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add chsql extension #43
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave a brief looks, we would need to write a proper template for SQL-only extensions with @Alex-Monahan, but that's for later.
I noticed in the macros there is a:
CREATE OR REPLACE MACRO intDiv(a, b) AS (a / b);
CREATE OR REPLACE MACRO intDivOrZero(a, b) AS COALESCE((a / b), 0);
but //
should be used for integer division, otherwise you will get a floating point number as result.
Thanks, and Welcome!
Is anything out of place? I'd be curious to learn and improve and/or act as a guinea duck anytime
We don't actually use the aliases sql file, its purely a reference for testing and understanding the logic. The actual code is as follows:
Does it look proper? |
I think you still need a double
see also https://duckdb.org/docs/sql/functions/numeric.html#division-and-modulo-operators
|
@carlopi totally missed that and wrongly assumed you were referring to casting. |
Essential fix based on [thread suggestion](duckdb/community-extensions#43 (review))
Fixed in 17c249ba08a9b88338e77c7f2d6e5dd2040b4590 |
Truth is that version field is, at the moment, not really used, only relevant information, also used on extension install is the ref. |
Adding chsql extension to Community 🤞
Special thanks @carlopi for all the support and assistance backporting the builders to v1.0.0 ⭐