zeropc opened a new issue #6911: URL: https://github.com/apache/incubator-doris/issues/6911
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Version current master branch (0.14.0) ### What's Wrong? create a table like: CREATE TABLE `blabla` ( `logdate` date NULL COMMENT "时间分区", `uid` bitmap BITMAP_UNION NULL COMMENT "用户id" ) ENGINE=OLAP AGGREGATE KEY(`logdate`) COMMENT ""; step1: Load data with long type uid into the table (ex. 1450361570489487360, 1450328306748575744). There should be **at least two rows** in one logdate. step2: Execute query: SELECT BITMAP_TO_STRING(BITMAP_UNION(uid)) from blabla. Got '3006188025784258560,16832520353274220544'. ### What You Expected? bitmap with multiple long values should be stored correctly. Help us pls. {@link Roaring64Map#serialize} High bytes of the long value should be written in little endian orders like below: final int key = entry.getKey(); final byte[] writeBuffer = new byte[4]; writeBuffer[0] = (byte)(key); writeBuffer[1] = (byte)(key >>> 8); writeBuffer[2] = (byte)(key >>> 16); writeBuffer[3] = (byte)(key >>> 24); out.write(writeBuffer, 0, 4); ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
