You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/03/12 14:57:18 UTC

[GitHub] [incubator-doris] kangkaisen commented on a change in pull request #3090: (#3088) Support Java version 64 bits Integers for BITMAP type

kangkaisen commented on a change in pull request #3090: (#3088) Support Java version 64 bits Integers for BITMAP type
URL: https://github.com/apache/incubator-doris/pull/3090#discussion_r391679533
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/load/loadv2/Roaring64Map.java
 ##########
 @@ -0,0 +1,1456 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.load.loadv2;
+
+import org.roaringbitmap.BitmapDataProvider;
+import org.roaringbitmap.BitmapDataProviderSupplier;
+import org.roaringbitmap.IntConsumer;
+import org.roaringbitmap.IntIterator;
+import org.roaringbitmap.RoaringBitmap;
+import org.roaringbitmap.RoaringBitmapSupplier;
+import org.roaringbitmap.Util;
+import org.roaringbitmap.buffer.MutableRoaringBitmap;
+import org.roaringbitmap.longlong.ImmutableLongBitmapDataProvider;
+import org.roaringbitmap.longlong.LongConsumer;
+import org.roaringbitmap.longlong.LongIterator;
+import org.roaringbitmap.longlong.Roaring64NavigableMap;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.math.BigInteger;
+import java.util.AbstractMap;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.NavigableMap;
+import java.util.Objects;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+import static org.apache.doris.common.util.Util.decodeVarint64;
+import static org.apache.doris.common.util.Util.encodeVarint64;
+
+/**
+ *  used in spark load progress to build 64 bits int bitmap
+ *  forked from https://github.com/RoaringBitmap/RoaringBitmap/blob/RoaringBitmap-0.8.13/RoaringBitmap/src/main/java/org/roaringbitmap/longlong/Roaring64NavigableMap.java
+ *  mainly overwrite serialize/deserialize method to keep the storage format consist with be's 64 bit int bitmap
+ *  for bitmap using in doris,we don't care the way ordering long
+ *  so disable constructor with args signedLongs and using the default order
+ */
+public class Roaring64Map {
 
 Review comment:
   Why only support BITMAP64 and not support EMPTY, SINGLE32, BITMAP32, SINGLE64?
   
   Please explain which concrete methods are custom.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org