-
Notifications
You must be signed in to change notification settings - Fork 37
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
Support table creation of Scalar DB on JDBC in schema-tool #152
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.
Thank you!
I think it can be getting simpler.
Please take a look at my comments.
@yito88 Thank you for reviewing this and giving me the great advices! I will modify the patch based on them and push a new commit for it. Thanks. |
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.
Overall looking good!
I left minor comments and suggestions.
(= rdb-engine :sql-server) "BIT" | ||
:else "BOOLEAN")) | ||
|
||
(defn- boolean-value-true |
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.
Can you clarify when this method returns true?
I feel it should be renamed for more ease of understanding.
(key? column clustering-key) "CLUSTERING" | ||
:else nil)) | ||
|
||
(defn- get-secondary-indexed [rdb-engine column secondary-index] |
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.
If it returns true/false, should it be like is-secondary-indexed
?
"BOOLEAN" "BIT" | ||
"BLOB" "VARBINARY"}}) | ||
|
||
(def ^:private data-type-mapping-for-key |
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.
👍
Co-authored-by: Hiroyuki Yamada <[email protected]> Co-authored-by: Yuji Ito <[email protected]>
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.
Looks better! Thanks 👍
I left some comments.
{:keys [boolean-value-fn] :as opts} | ||
column data-type ordinal-position] | ||
(let [key-type (get-key-type column partition-key clustering-key) | ||
key-order (if (key? column clustering-key) "ASC" nil) |
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.
How about this? The corresponding if
can be removed?
key-order (if (key? column clustering-key) "ASC" nil) | |
key-order (if (key? column clustering-key) "'ASC'" "NULL") |
It seems like the CI failure was not related to this change. I will rerun the CI. |
…e mapping for key
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.
LGTM! Thank you!
Co-authored-by: Yuji Ito <[email protected]>
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.
Still LGTM! Left some minor suggestions on the documentation.
Co-authored-by: Hiroyuki Yamada <[email protected]>
Co-authored-by: Hiroyuki Yamada <[email protected]>
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.
LGTM! 👍
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.
LGTM!
https://scalar-labs.atlassian.net/browse/DLT-7846
As I'm new to Clojure, this code might not be good. Please review it from the Clojure perspective as well 😄