-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fixes #17085: Update Oracle count & unique count function to handle HexByteString/Blob types #17596
Conversation
def _unique_count_query_oracle(col, session, sample): | ||
count_fn = col | ||
if isinstance(col.type, HexByteString): | ||
count_fn = CountFn(col) | ||
return ( | ||
session.query(func.count(count_fn)) | ||
.select_from(sample) | ||
.group_by(count_fn) | ||
.having(func.count(count_fn) == 1) | ||
) |
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.
Shouldn't this be handled in the CountFn
itself?
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.
func.count(col) gives -> 'count(propagated_msgid)'
whereas when i pass in the Countfn with custom logic for HexByteString i.e. blob as we have mapped it internally, then we get the count as count(DBMS_LOB.GETLENGTH(propagated_msgid))
we have handled it in CountFn, unique count though doesn't take CountFn, rather it uses func.count
3dfe1af
to
ebfbfb9
Compare
Quality Gate passed for 'open-metadata-ingestion'Issues Measures |
* main: Fixes open-metadata#17085: Update Oracle count & unique count function to handle HexByteString/Blob types (open-metadata#17596)
Describe your changes:
Fixes #17085
I worked on Updating Oracle count & unique count function to handle HexByteString/Blob types
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>