-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 BE UDF bitmap_and and bitmap_or #2649
Closed
Closed
Changes from 12 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
f154026
ADD BE BitMap UDF and & or
c098178
[Index] Implements create drop show index syntax for bitmap index [#2…
yangzhg 5dff936
Fix HLL_UNION_AGG AnalyticFn result in BE core by adding hll_get_valu…
kangkaisen 458ed55
Fix BITMAP_UNION_COUNT couldn't hit rollup table (#2655)
kangkaisen 42dfe13
Add filter conditions for 'show partitions from table' syntax (#2553)
caiconghui 1ca8212
Fix doris be compile error for Ubuntu14.04 (#2647)
caiconghui af9529a
[Dynamic Partition] Support for automatically adding partitions
WingsGo 1648226
Adapt arrow 0.15 API (#2657)
imay 220ed84
[Unit Test]Fix Schema Change Test Case (#2659)
WingsGo e1e6830
ADD BE BitMap UDF and & or
2699cb1
Merge branch 'be_bitmap_udf-0.1' of github.com:DanyBin/incubator-dori…
8a5ee6a
Fix FE couldn't start (#2662)
kangkaisen 87a5007
Fix bug: parquet scanner don't seek (#2661)
imay 7f148c1
[Build]Make set target arch universal (#2660)
WingsGo 2f990c0
fix bitmap udf
60ad66b
ADD BE BitMap UDF and & or
5ebbeb4
fix bitmap udf
a54a7c0
a
76ad4ac
Merge branch 'be_bitmap_udf-0.1' of github.com:DanyBin/incubator-dori…
c6e261d
doc
80d0d3e
Fix bug: CreateIndexClause can be casted to AlterTableClause (#2667)
songenjie 7ab479a
Fix incompatibility with arm architecture in util and gutil (#2650)
yangzhg b14a1cf
Add nio support for mysql protocol implementation (#2603)
infearOnTheWay 9f7b253
ADD BE BitMap UDF and & or
29e0abc
ADD BE BitMap UDF and & or
6784143
fix bitmap udf
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -388,6 +388,51 @@ BigIntVal BitmapFunctions::bitmap_intersect_finalize(FunctionContext* ctx, const | |
return result; | ||
} | ||
|
||
StringVal BitmapFunctions::bitmap_or(FunctionContext* ctx, const StringVal& src, const StringVal& dst){ | ||
RoaringBitmap bitmap; | ||
if(!src.is_null){ | ||
if(src.len == 0 ){ | ||
bitmap.merge(*reinterpret_cast<RoaringBitmap*>(src.ptr)); | ||
} else{ | ||
bitmap.merge(RoaringBitmap ((char*)src.ptr)); | ||
} | ||
} | ||
|
||
if(!dst.is_null){ | ||
if(dst.len == 0){ | ||
bitmap.merge(*reinterpret_cast<RoaringBitmap*>(dst.ptr)); | ||
} else{ | ||
bitmap.merge(RoaringBitmap ((char*)dst.ptr)); | ||
} | ||
} | ||
|
||
StringVal result(ctx,bitmap.size()); | ||
bitmap.serialize((char*)result.ptr); | ||
return result; | ||
} | ||
StringVal BitmapFunctions::bitmap_and(FunctionContext* ctx, const StringVal& src, const StringVal& dst){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is the third parameter called ‘dst’ appropriate? |
||
RoaringBitmap bitmap; | ||
if(!src.is_null){ | ||
if(src.len == 0 ){ | ||
bitmap.merge(*reinterpret_cast<RoaringBitmap*>(src.ptr)); | ||
} else{ | ||
bitmap.merge(RoaringBitmap ((char*)src.ptr)); | ||
} | ||
} | ||
|
||
if(!dst.is_null){ | ||
if(dst.len == 0){ | ||
bitmap.intersect(*reinterpret_cast<RoaringBitmap*>(dst.ptr)); | ||
} else{ | ||
bitmap.intersect(RoaringBitmap ((char*)dst.ptr)); | ||
} | ||
} | ||
|
||
StringVal result(ctx,bitmap.size()); | ||
bitmap.serialize((char*)result.ptr); | ||
return result; | ||
} | ||
|
||
|
||
template void BitmapFunctions::bitmap_update_int<TinyIntVal>( | ||
FunctionContext* ctx, const TinyIntVal& src, StringVal* dst); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
src and dst can be null, you should handle this case.
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.
OK. I will update doc and fix this case.