-
Notifications
You must be signed in to change notification settings - Fork 609
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(datafusion, flink, mssql): add uuid operation #8545
Conversation
ibis/backends/oracle/compiler.py
Outdated
@@ -227,6 +227,14 @@ def visit_RandomScalar(self, op): | |||
# Not using FuncGen here because of dotted function call | |||
return sg.func("dbms_random.value") | |||
|
|||
def visit_RandomUUID(self, op): |
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.
@jcrist There is no builtin uuid
in oracle, I used the sys_guid
and reformat it into a uuid format, but not sure if it is ok. since it a not a real uuid, it fails the version == 4
test.
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 there's no uuid
, then there's no uuid
-- this can remain unimplemented for the Oracle backend unless we are very confident that the semantics match other implementations.
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 will remove oracle for now.
ibis/backends/pyspark/compiler.py
Outdated
@@ -70,6 +70,7 @@ class PySparkCompiler(SQLGlotCompiler): | |||
ops.Hash: "hash", | |||
ops.Log10: "log10", | |||
ops.LStrip: "ltrim", | |||
ops.RandomUUID: "uuid", |
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.
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.
We don't currently support spark 4.0, so I don't think we should provide this mapping.
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.
Could we open an issue documenting this so when we support spark 4.0 (not sure how realistic that is) then this could be a nice onboarding issue?
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 will remove pyspark uuid support for now and open an issue for future reference.
@gforsyth and @ncclementi I removed the oracle and pyspark, please take a review again. Thanks for your time. |
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.
Thanks @jitingxu1 ! The code here looks good.
Can you update the PR title to match what's implemented here? Something like:
feat(datafusion, flink, mssql): add uuid operation
And then update the PR description to reflect the current code state? That's what end up as the body of the commit on main.
Done @gforsyth |
Description of changes
Continued from PR:
add uuid operation for mssql, flink, datafusion,
Issues closed