You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/12/16 03:32:30 UTC
[GitHub] [ignite-3] Berkof commented on a change in pull request #498: IGNITE-15870 Calcite. Replace usages of Lists and Sets of int to IntList\IntSet
Berkof commented on a change in pull request #498:
URL: https://github.com/apache/ignite-3/pull/498#discussion_r770199435
##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/Commons.java
##########
@@ -598,12 +600,12 @@ public static int nextPowerOf2(int v) {
* @param elems Elems.
* @return The longest possible prefix of {@code seq}.
*/
- public static <T> List<T> maxPrefix(List<T> seq, Collection<T> elems) {
- List<T> res = new ArrayList<>();
+ public static List<Integer> maxPrefix(List<Integer> seq, Collection<Integer> elems) {
+ List<Integer> res = new IntArrayList();
- Set<T> elems0 = new HashSet<>(elems);
+ Set<Integer> elems0 = new IntOpenHashSet(elems);
- for (T e : seq) {
+ for (Integer e : seq) {
if (!elems0.remove(e)) {
break;
}
Review comment:
Done
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org