1 /***********************************************************************
2  * Copyright (c) 2013-2024 Commonwealth Computer Research, Inc.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Apache License, Version 2.0
5  * which accompanies this distribution and is available at
6  * http://www.opensource.org/licenses/apache2.0.php.
7  ***********************************************************************/
8 
9 package org.locationtech.geomesa.index.geotools
10 
11 import com.typesafe.scalalogging.LazyLogging
12 import org.geotools.api.data._
13 import org.geotools.api.feature.FeatureVisitor
14 import org.geotools.api.feature.simple.{SimpleFeature, SimpleFeatureType}
15 import org.geotools.api.filter.Filter
16 import org.geotools.api.filter.expression.{Expression, PropertyName}
17 import org.geotools.api.filter.sort.SortBy
18 import org.geotools.api.util.ProgressListener
19 import org.geotools.data.simple.SimpleFeatureCollection
20 import org.geotools.data.store.DataFeatureCollection
21 import org.geotools.data.util.NullProgressListener
22 import org.geotools.feature.FeatureCollection
23 import org.geotools.feature.collection.{DecoratingFeatureCollection, DecoratingSimpleFeatureCollection}
24 import org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult
25 import org.geotools.feature.visitor._
26 import org.geotools.geometry.jts.ReferencedEnvelope
27 import org.locationtech.geomesa.filter.FilterHelper
28 import org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection
29 import org.locationtech.geomesa.index.process.GeoMesaProcessVisitor
30 import org.locationtech.geomesa.index.stats.GeoMesaStats
31 import org.locationtech.geomesa.utils.collection.CloseableIterator
32 import org.locationtech.geomesa.utils.io.WithClose
33 import org.locationtech.geomesa.utils.stats._
34 
35 import java.util.Collections
36 import java.util.concurrent.atomic.AtomicLong
37 import scala.annotation.tailrec
38 
39 /**
40   * Feature collection implementation
41   */
42 class GeoMesaFeatureCollection(source: GeoMesaFeatureSource, query: Query)
43     extends GeoMesaFeatureVisitingCollection(source, source.ds.stats, query) {
44 
45   private val transaction = source match {
46     case s: SimpleFeatureStore => s.getTransaction
47     case _ => Transaction.AUTO_COMMIT
48   }
49 
50   private lazy val featureReader = source.ds.getFeatureReader(source.sft, transaction, query)
51 
52   override def getSchema: SimpleFeatureType = featureReader.schema
53 
54   override def reader(): FeatureReader[SimpleFeatureType, SimpleFeature] = featureReader.reader()
55 
56   override def subCollection(filter: Filter): SimpleFeatureCollection = {
57     val merged = new Query(query)
58     val filters = Seq(merged.getFilter, filter).filter(_ != Filter.INCLUDE)
59     FilterHelper.filterListAsAnd(filters).foreach(merged.setFilter)
60     new GeoMesaFeatureCollection(source, merged)
61   }
62 
63   override def sort(order: SortBy): SimpleFeatureCollection = {
64     val merged = new Query(query)
65     if (merged.getSortBy == null) {
66       merged.setSortBy(order)
67     } else {
68       merged.setSortBy(merged.getSortBy :+ order: _*)
69     }
70     new GeoMesaFeatureCollection(source, merged)
71   }
72 
73   override def getBounds: ReferencedEnvelope = source.getBounds(query)
74 
75   override def getCount: Int = source.getCount(query)
76 
77   // note: this shouldn't return -1 (as opposed to FeatureSource.getCount), but we still don't return a valid
78   // size unless exact counts are enabled
79   override def size: Int = {
80     val count = getCount
81     if (count < 0) { 0 } else { count }
82   }
83 
84   override def contains(o: Any): Boolean = {
85     o match {
86       case f: SimpleFeature =>
87         val sub = subCollection(FilterHelper.ff.id(f.getIdentifier))
88         WithClose(CloseableIterator(sub.features()))(_.nonEmpty)
89 
90       case _ => false
91     }
92   }
93 
94   override def containsAll(collection: java.util.Collection[_]): Boolean = {
95     val size = collection.size()
96     if (size == 0) { true } else {
97       val filters = Seq.newBuilder[Filter]
98       filters.sizeHint(size)
99 
100       val features = collection.iterator()
101       while (features.hasNext) {
102         features.next match {
103           case f: SimpleFeature => filters += FilterHelper.ff.id(f.getIdentifier)
104           case _ => return false
105         }
106       }
107 
108       val sub = subCollection(org.locationtech.geomesa.filter.orFilters(filters.result))
109       WithClose(CloseableIterator(sub.features()))(_.length) == size
110     }
111   }
112 }
113 
114 object GeoMesaFeatureCollection extends LazyLogging {
115 
116   import scala.collection.JavaConverters._
117 
118   private val oneUp = new AtomicLong(0)
119 
120   def nextId: String = s"GeoMesaFeatureCollection-${oneUp.getAndIncrement()}"
121 
122   /**
123     * Attempts to visit the feature collection in an optimized manner. This will unwrap any decorating
124     * feature collections that may interfere with the `accepts` method.
125     *
126     * Note that generally this may not be a good idea - collections are presumably wrapped for a reason.
127     * However, our visitation functionality keeps being broken by changes in GeoServer, so we're being
128     * defensive here.
129     *
130     * @param collection feature collection
131     * @param visitor visitor
132     * @param progress progress monitor
133     */
134   def visit(
135       collection: FeatureCollection[SimpleFeatureType, SimpleFeature],
136       visitor: FeatureVisitor,
137       progress: ProgressListener = new NullProgressListener): Unit = {
138     val unwrapped = if (collection.isInstanceOf[GeoMesaFeatureVisitingCollection]) { collection } else {
139       try { unwrap(collection) } catch {
140         case e: Throwable => logger.debug("Error trying to unwrap feature collection:", e); collection
141       }
142     }
143     unwrapped.accepts(visitor, progress)
144   }
145 
146   /**
147     * Attempts to remove any decorating feature collections
148     *
149     * @param collection collection
150     * @param level level of collections that have been removed, used to detect potentially infinite looping
151     * @return
152     */
153   @tailrec
154   private def unwrap(
155       collection: FeatureCollection[SimpleFeatureType, SimpleFeature],
156       level: Int = 1): FeatureCollection[SimpleFeatureType, SimpleFeature] = {
157 
158     // noinspection TypeCheckCanBeMatch
159     val unwrapped = if (collection.isInstanceOf[DecoratingSimpleFeatureCollection]) {
160       getDelegate(collection, classOf[DecoratingSimpleFeatureCollection])
161     } else if (collection.isInstanceOf[DecoratingFeatureCollection[SimpleFeatureType, SimpleFeature]]) {
162       getDelegate(collection, classOf[DecoratingFeatureCollection[SimpleFeatureType, SimpleFeature]])
163     } else {
164       logger.debug(s"Unable to unwrap feature collection $collection of class ${collection.getClass.getName}")
165       return collection
166     }
167 
168     logger.debug(s"Unwrapped feature collection $collection of class ${collection.getClass.getName} to " +
169         s"$unwrapped of class ${unwrapped.getClass.getName}")
170 
171     if (unwrapped.isInstanceOf[GeoMesaFeatureVisitingCollection]) {
172       unwrapped
173     } else if (level > 9) {
174       logger.debug("Aborting feature collection unwrapping after 10 iterations")
175       unwrapped
176     } else {
177       unwrap(unwrapped, level + 1)
178     }
179   }
180 
181   /**
182     * Uses reflection to access the protected field 'delegate' in decorating feature collection classes
183     *
184     * @param collection decorating feature collection
185     * @param clas decorating feature base class
186     * @return
187     */
188   private def getDelegate(
189       collection: FeatureCollection[SimpleFeatureType, SimpleFeature],
190       clas: Class[_]): FeatureCollection[SimpleFeatureType, SimpleFeature] = {
191     val m = clas.getDeclaredField("delegate")
192     m.setAccessible(true)
193     m.get(collection).asInstanceOf[FeatureCollection[SimpleFeatureType, SimpleFeature]]
194   }
195 
196   /**
197     * Base class for handling feature visitors
198     *
199     * @param source feature source
200     * @param stats geomesa stat hook
201     * @param query query
202     */
203   abstract class GeoMesaFeatureVisitingCollection(source: SimpleFeatureSource, stats: GeoMesaStats, query: Query)
204       extends DataFeatureCollection(nextId) with LazyLogging {
205 
206     private def unoptimized(visitor: FeatureVisitor, progress: ProgressListener): Unit = {
207       lazy val warning = s"Using unoptimized method for visiting '${visitor.getClass.getName}'"
208       logger.warn(warning)
209       if (progress != null) {
210         progress.warningOccurred(getClass.getName, "accepts()", warning)
211       }
212       super.accepts(visitor, progress)
213     }
214 
215     override def accepts(visitor: FeatureVisitor, progress: ProgressListener): Unit = {
216       visitor match {
217         case v: GeoMesaProcessVisitor =>
218           v.execute(source, query)
219 
220         case v: AverageVisitor if v.getExpression.isInstanceOf[PropertyName] =>
221           val attribute = v.getExpression.asInstanceOf[PropertyName].getPropertyName
222           val stat = Stat.DescriptiveStats(Seq(attribute))
223           stats.getStat[DescriptiveStats](source.getSchema, stat, query.getFilter, exact = true) match {
224             case Some(s) if s.count <= Int.MaxValue.toLong => v.setValue(s.count.toInt, s.sum(0))
225             case Some(s) => v.setValue(s.mean(0))
226             case None    => unoptimized(visitor, progress)
227           }
228 
229         case v: BoundsVisitor =>
230           v.getBounds.expandToInclude(stats.getBounds(source.getSchema, query.getFilter))
231 
232         case v: CountVisitor =>
233           v.setValue(source.getCount(query))
234 
235         case v: MaxVisitor if v.getExpression.isInstanceOf[PropertyName] =>
236           val attribute = v.getExpression.asInstanceOf[PropertyName].getPropertyName
237           minMax(attribute, exact = false).orElse(minMax(attribute, exact = true)) match {
238             case Some((_, max)) => v.setValue(max)
239             case None           => unoptimized(visitor, progress)
240           }
241 
242         case v: GroupByVisitor if v.getExpression.isInstanceOf[PropertyName] =>
243           val attribute = v.getExpression.asInstanceOf[PropertyName].getPropertyName
244           groupBy(attribute, v.getGroupByAttributes.asScala.toSeq, v.getAggregateVisitor) match {
245             case Some(result) => v.setValue(result)
246             case None         => unoptimized(visitor, progress)
247           }
248 
249         case v: MinVisitor if v.getExpression.isInstanceOf[PropertyName] =>
250           val attribute = v.getExpression.asInstanceOf[PropertyName].getPropertyName
251           minMax(attribute, exact = false).orElse(minMax(attribute, exact = true)) match {
252             case Some((min, _)) => v.setValue(min)
253             case None           => unoptimized(visitor, progress)
254           }
255 
256         case v: SumVisitor if v.getExpression.isInstanceOf[PropertyName] =>
257           val attribute = v.getExpression.asInstanceOf[PropertyName].getPropertyName
258           val stat = Stat.DescriptiveStats(Seq(attribute))
259           stats.getStat[DescriptiveStats](source.getSchema, stat, query.getFilter, exact = true) match {
260             case Some(s) => v.setValue(s.sum(0))
261             case None    => unoptimized(visitor, progress)
262           }
263 
264         case v: UniqueVisitor if v.getExpression.isInstanceOf[PropertyName] =>
265           val attribute = v.getExpression.asInstanceOf[PropertyName].getPropertyName
266           val stat = Stat.Enumeration(attribute)
267           stats.getStat[EnumerationStat[Any]](source.getSchema, stat, query.getFilter, exact = true) match {
268             case Some(s) => v.setValue(s.values.toList.asJava)
269             case None    => unoptimized(visitor, progress)
270           }
271 
272         case _ =>
273           unoptimized(visitor, progress)
274       }
275     }
276 
277     private def minMax(attribute: String, exact: Boolean): Option[(Any, Any)] =
278       stats.getMinMax[Any](source.getSchema, attribute, query.getFilter, exact).map(_.bounds)
279 
280     private def groupBy(
281         attribute: String,
282         groupByExpression: Seq[Expression],
283         aggregate: FeatureVisitor): Option[java.util.List[GroupByRawResult]] = {
284       if (groupByExpression.lengthCompare(1) != 0
285           || groupByExpression.exists(e => !e.isInstanceOf[PropertyName])) { None } else {
286         val groupBy = groupByExpression.map(_.asInstanceOf[PropertyName].getPropertyName).head
287         val op: Option[(String, Stat => Any)] = aggregate match {
288           case _: CountVisitor =>
289             Some(Stat.Count() -> { (s: Stat) => math.min( s.asInstanceOf[CountStat].count, Int.MaxValue.toLong).toInt })
290 
291           case _: MaxVisitor =>
292             Some(Stat.MinMax(attribute) -> { (s: Stat) => s.asInstanceOf[MinMax[Any]].max })
293 
294           case _: MinVisitor =>
295             Some(Stat.MinMax(attribute) -> { (s: Stat) => s.asInstanceOf[MinMax[Any]].min })
296 
297           case _ =>
298             None
299         }
300         op.flatMap { case (nested, unwrap) =>
301           val stat = Stat.GroupBy(groupBy, nested)
302           stats.getStat[GroupBy[AnyRef]](source.getSchema, stat, query.getFilter, exact = true).map { grouped =>
303             val result = new java.util.ArrayList[GroupByRawResult]
304             grouped.iterator.foreach { case (group, stat) =>
305               result.add(new GroupByRawResult(Collections.singletonList(group), unwrap(stat)))
306             }
307             result
308           }
309         }
310       }
311     }
312   }
313 }
Line Stmt Id Pos Tree Symbol Tests Code
45 3592 2160 - 2166 Select org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.source GeoMesaFeatureCollection.this.source
46 3593 2209 - 2225 Apply org.geotools.api.data.FeatureStore.getTransaction s.getTransaction()
46 3594 2209 - 2225 Block org.geotools.api.data.FeatureStore.getTransaction s.getTransaction()
47 3595 2240 - 2263 Select org.geotools.api.data.Transaction.AUTO_COMMIT org.geotools.api.data.Transaction.AUTO_COMMIT
47 3596 2240 - 2263 Block org.geotools.api.data.Transaction.AUTO_COMMIT org.geotools.api.data.Transaction.AUTO_COMMIT
52 3597 2410 - 2430 Select org.locationtech.geomesa.index.geotools.GeoMesaFeatureReader.schema GeoMesaFeatureCollection.this.featureReader.schema
54 3598 2507 - 2529 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureReader.reader GeoMesaFeatureCollection.this.featureReader.reader()
57 3599 2632 - 2637 Select org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.query GeoMesaFeatureCollection.this.query
57 3600 2622 - 2638 Apply org.geotools.api.data.Query.<init> new org.geotools.api.data.Query(GeoMesaFeatureCollection.this.query)
58 3601 2661 - 2677 Apply org.geotools.api.data.Query.getFilter merged.getFilter()
58 3602 2699 - 2713 Select org.geotools.api.filter.Filter.INCLUDE org.geotools.api.filter.Filter.INCLUDE
58 3603 2694 - 2713 Apply java.lang.Object.!= x$1.!=(org.geotools.api.filter.Filter.INCLUDE)
58 3604 2657 - 2714 Apply scala.collection.TraversableLike.filter scala.collection.Seq.apply[org.geotools.api.filter.Filter](merged.getFilter(), filter).filter(((x$1: org.geotools.api.filter.Filter) => x$1.!=(org.geotools.api.filter.Filter.INCLUDE)))
59 3605 2765 - 2781 Apply org.geotools.api.data.Query.setFilter merged.setFilter(x$1)
59 3606 2719 - 2782 Apply scala.Option.foreach org.locationtech.geomesa.filter.FilterHelper.filterListAsAnd(filters).foreach[Unit]({ ((x$1: org.geotools.api.filter.Filter) => merged.setFilter(x$1)) })
60 3607 2816 - 2822 Select org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.source GeoMesaFeatureCollection.this.source
60 3608 2787 - 2831 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.<init> new GeoMesaFeatureCollection(GeoMesaFeatureCollection.this.source, merged)
64 3609 2928 - 2933 Select org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.query GeoMesaFeatureCollection.this.query
64 3610 2918 - 2934 Apply org.geotools.api.data.Query.<init> new org.geotools.api.data.Query(GeoMesaFeatureCollection.this.query)
65 3611 2943 - 2967 Apply java.lang.Object.== merged.getSortBy().==(null)
66 3612 2977 - 3000 Apply org.geotools.api.data.Query.setSortBy merged.setSortBy(order)
66 3613 2977 - 3000 Block org.geotools.api.data.Query.setSortBy merged.setSortBy(order)
68 3614 3037 - 3053 Apply org.geotools.api.data.Query.getSortBy merged.getSortBy()
68 3615 3037 - 3062 ApplyToImplicitArgs scala.collection.mutable.ArrayOps.:+ scala.Predef.refArrayOps[org.geotools.api.filter.sort.SortBy](merged.getSortBy()).:+[org.geotools.api.filter.sort.SortBy](order)((ClassTag.apply[org.geotools.api.filter.sort.SortBy](classOf[org.geotools.api.filter.sort.SortBy]): scala.reflect.ClassTag[org.geotools.api.filter.sort.SortBy]))
68 3616 3020 - 3067 Apply org.geotools.api.data.Query.setSortBy merged.setSortBy((scala.Predef.refArrayOps[org.geotools.api.filter.sort.SortBy](merged.getSortBy()).:+[org.geotools.api.filter.sort.SortBy](order)((ClassTag.apply[org.geotools.api.filter.sort.SortBy](classOf[org.geotools.api.filter.sort.SortBy]): scala.reflect.ClassTag[org.geotools.api.filter.sort.SortBy])): _*))
68 3617 3020 - 3067 Block org.geotools.api.data.Query.setSortBy merged.setSortBy((scala.Predef.refArrayOps[org.geotools.api.filter.sort.SortBy](merged.getSortBy()).:+[org.geotools.api.filter.sort.SortBy](order)((ClassTag.apply[org.geotools.api.filter.sort.SortBy](classOf[org.geotools.api.filter.sort.SortBy]): scala.reflect.ClassTag[org.geotools.api.filter.sort.SortBy])): _*))
70 3618 3107 - 3113 Select org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.source GeoMesaFeatureCollection.this.source
70 3619 3078 - 3122 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.<init> new GeoMesaFeatureCollection(GeoMesaFeatureCollection.this.source, merged)
73 3620 3192 - 3197 Select org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.query GeoMesaFeatureCollection.this.query
73 3621 3175 - 3198 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureSource.getBounds GeoMesaFeatureCollection.this.source.getBounds(GeoMesaFeatureCollection.this.query)
75 3622 3247 - 3252 Select org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.query GeoMesaFeatureCollection.this.query
75 3623 3231 - 3253 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureSource.getCount GeoMesaFeatureCollection.this.source.getCount(GeoMesaFeatureCollection.this.query)
80 3624 3452 - 3460 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.getCount GeoMesaFeatureCollection.this.getCount()
81 3625 3469 - 3478 Apply scala.Int.< count.<(0)
81 3626 3482 - 3483 Literal <nosymbol> 0
81 3627 3482 - 3483 Block <nosymbol> 0
81 3628 3493 - 3498 Ident org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.count count
86 3637 3593 - 3729 Block <nosymbol> { val sub: org.geotools.data.simple.SimpleFeatureCollection = GeoMesaFeatureCollection.this.subCollection(org.locationtech.geomesa.filter.FilterHelper.ff.id(f.getIdentifier())); org.locationtech.geomesa.utils.io.`package`.WithClose.apply[org.locationtech.geomesa.utils.collection.CloseableIterator[org.geotools.api.feature.simple.SimpleFeature], Boolean](org.locationtech.geomesa.utils.collection.CloseableIterator.apply(sub.features()))(((x$2: org.locationtech.geomesa.utils.collection.CloseableIterator[org.geotools.api.feature.simple.SimpleFeature]) => x$2.nonEmpty))(io.this.IsCloseable.closeableIsCloseable) }
87 3629 3647 - 3662 Apply org.geotools.api.feature.Feature.getIdentifier f.getIdentifier()
87 3630 3628 - 3663 Apply org.geotools.api.filter.FilterFactory.id org.locationtech.geomesa.filter.FilterHelper.ff.id(f.getIdentifier())
87 3631 3614 - 3664 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.subCollection GeoMesaFeatureCollection.this.subCollection(org.locationtech.geomesa.filter.FilterHelper.ff.id(f.getIdentifier()))
88 3632 3701 - 3715 Apply org.geotools.data.simple.SimpleFeatureCollection.features sub.features()
88 3633 3683 - 3716 Apply org.locationtech.geomesa.utils.collection.CloseableIterator.apply org.locationtech.geomesa.utils.collection.CloseableIterator.apply(sub.features())
88 3634 3718 - 3728 Select scala.collection.TraversableOnce.nonEmpty x$2.nonEmpty
88 3635 3717 - 3717 Select org.locationtech.geomesa.utils.io.IsCloseableImplicits.closeableIsCloseable io.this.IsCloseable.closeableIsCloseable
88 3636 3673 - 3729 ApplyToImplicitArgs org.locationtech.geomesa.utils.io.WithClose.apply org.locationtech.geomesa.utils.io.`package`.WithClose.apply[org.locationtech.geomesa.utils.collection.CloseableIterator[org.geotools.api.feature.simple.SimpleFeature], Boolean](org.locationtech.geomesa.utils.collection.CloseableIterator.apply(sub.features()))(((x$2: org.locationtech.geomesa.utils.collection.CloseableIterator[org.geotools.api.feature.simple.SimpleFeature]) => x$2.nonEmpty))(io.this.IsCloseable.closeableIsCloseable)
90 3638 3747 - 3752 Literal <nosymbol> false
90 3639 3747 - 3752 Block <nosymbol> false
95 3640 3856 - 3873 Apply java.util.Collection.size collection.size()
96 3641 3882 - 3891 Apply scala.Int.== size.==(0)
96 3642 3895 - 3899 Literal <nosymbol> true
96 3643 3895 - 3899 Block <nosymbol> true
96 3664 3907 - 4385 Block <nosymbol> { val filters: scala.collection.mutable.Builder[org.geotools.api.filter.Filter,Seq[org.geotools.api.filter.Filter]] = scala.collection.Seq.newBuilder[org.geotools.api.filter.Filter]; filters.sizeHint(size); val features: java.util.Iterator[_] = collection.iterator(); while$1(){ if (features.hasNext()) { features.next() match { case (f @ (_: org.geotools.api.feature.simple.SimpleFeature)) => filters.+=(org.locationtech.geomesa.filter.FilterHelper.ff.id(f.getIdentifier())) case _ => return false }; while$1() } else () }; val sub: org.geotools.data.simple.SimpleFeatureCollection = GeoMesaFeatureCollection.this.subCollection({ <artifact> val x$1: Seq[org.geotools.api.filter.Filter] @scala.reflect.internal.annotations.uncheckedBounds = filters.result(); <artifact> val x$2: org.geotools.api.filter.FilterFactory = org.locationtech.geomesa.filter.`package`.orFilters$default$2(x$1); org.locationtech.geomesa.filter.`package`.orFilters(x$1)(x$2) }); org.locationtech.geomesa.utils.io.`package`.WithClose.apply[org.locationtech.geomesa.utils.collection.CloseableIterator[org.geotools.api.feature.simple.SimpleFeature], Int](org.locationtech.geomesa.utils.collection.CloseableIterator.apply(sub.features()))(((x$3: org.locationtech.geomesa.utils.collection.CloseableIterator[org.geotools.api.feature.simple.SimpleFeature]) => x$3.length))(io.this.IsCloseable.closeableIsCloseable).==(size) }
97 3644 3929 - 3951 TypeApply scala.collection.Seq.newBuilder scala.collection.Seq.newBuilder[org.geotools.api.filter.Filter]
98 3645 3958 - 3980 Apply scala.collection.mutable.Builder.sizeHint filters.sizeHint(size)
100 3646 4003 - 4024 Apply java.util.Collection.iterator collection.iterator()
101 3647 4038 - 4054 Apply java.util.Iterator.hasNext features.hasNext()
101 3656 4066 - 4212 Block <nosymbol> { features.next() match { case (f @ (_: org.geotools.api.feature.simple.SimpleFeature)) => filters.+=(org.locationtech.geomesa.filter.FilterHelper.ff.id(f.getIdentifier())) case _ => return false }; while$1() }
101 3657 4031 - 4031 Literal <nosymbol> ()
101 3658 4031 - 4031 Block <nosymbol> ()
102 3648 4066 - 4079 Apply java.util.Iterator.next features.next()
102 3655 4080 - 4080 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.while$1 while$1()
103 3649 4153 - 4168 Apply org.geotools.api.feature.Feature.getIdentifier f.getIdentifier()
103 3650 4134 - 4169 Apply org.geotools.api.filter.FilterFactory.id org.locationtech.geomesa.filter.FilterHelper.ff.id(f.getIdentifier())
103 3651 4123 - 4169 Apply scala.collection.mutable.Builder.+= filters.+=(org.locationtech.geomesa.filter.FilterHelper.ff.id(f.getIdentifier()))
103 3652 4123 - 4169 Block scala.collection.mutable.Builder.+= filters.+=(org.locationtech.geomesa.filter.FilterHelper.ff.id(f.getIdentifier()))
104 3653 4197 - 4202 Literal <nosymbol> false
104 3654 4190 - 4202 Return org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.containsAll return false
108 3659 4294 - 4308 Apply scala.collection.mutable.Builder.result filters.result()
108 3660 4293 - 4293 Apply org.locationtech.geomesa.filter.orFilters$default$2 org.locationtech.geomesa.filter.`package`.orFilters$default$2(x$1)
108 3661 4252 - 4309 ApplyToImplicitArgs org.locationtech.geomesa.filter.orFilters org.locationtech.geomesa.filter.`package`.orFilters(x$1)(x$2)
108 3662 4238 - 4310 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.subCollection GeoMesaFeatureCollection.this.subCollection({ <artifact> val x$1: Seq[org.geotools.api.filter.Filter] @scala.reflect.internal.annotations.uncheckedBounds = filters.result(); <artifact> val x$2: org.geotools.api.filter.FilterFactory = org.locationtech.geomesa.filter.`package`.orFilters$default$2(x$1); org.locationtech.geomesa.filter.`package`.orFilters(x$1)(x$2) })
109 3663 4317 - 4379 Apply scala.Int.== org.locationtech.geomesa.utils.io.`package`.WithClose.apply[org.locationtech.geomesa.utils.collection.CloseableIterator[org.geotools.api.feature.simple.SimpleFeature], Int](org.locationtech.geomesa.utils.collection.CloseableIterator.apply(sub.features()))(((x$3: org.locationtech.geomesa.utils.collection.CloseableIterator[org.geotools.api.feature.simple.SimpleFeature]) => x$3.length))(io.this.IsCloseable.closeableIsCloseable).==(size)
118 3665 4514 - 4531 Apply java.util.concurrent.atomic.AtomicLong.<init> new java.util.concurrent.atomic.AtomicLong(0L)
120 3666 4558 - 4584 Literal <nosymbol> "GeoMesaFeatureCollection-"
120 3667 4609 - 4610 Literal <nosymbol> ""
120 3668 4585 - 4608 Apply java.util.concurrent.atomic.AtomicLong.getAndIncrement GeoMesaFeatureCollection.this.oneUp.getAndIncrement()
120 3669 4556 - 4610 Apply scala.StringContext.s scala.StringContext.apply("GeoMesaFeatureCollection-", "").s(GeoMesaFeatureCollection.this.oneUp.getAndIncrement())
138 3670 5363 - 5420 TypeApply scala.Any.isInstanceOf collection.isInstanceOf[org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection]
138 3671 5424 - 5434 Ident org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.collection collection
139 3672 5456 - 5474 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.unwrap GeoMesaFeatureCollection.this.unwrap(collection, GeoMesaFeatureCollection.this.unwrap$default$2)
139 3673 5456 - 5474 Block org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.unwrap GeoMesaFeatureCollection.this.unwrap(collection, GeoMesaFeatureCollection.this.unwrap$default$2)
139 3675 5450 - 5595 Try <nosymbol> try { GeoMesaFeatureCollection.this.unwrap(collection, GeoMesaFeatureCollection.this.unwrap$default$2) } catch { case (e @ (_: Throwable)) => { (if (GeoMesaFeatureCollection.this.logger.underlying.isDebugEnabled()) GeoMesaFeatureCollection.this.logger.underlying.debug("Error trying to unwrap feature collection:", e) else (): Unit); collection } }
140 3674 5511 - 5587 Block <nosymbol> { (if (GeoMesaFeatureCollection.this.logger.underlying.isDebugEnabled()) GeoMesaFeatureCollection.this.logger.underlying.debug("Error trying to unwrap feature collection:", e) else (): Unit); collection }
143 3676 5606 - 5642 Apply org.geotools.feature.FeatureCollection.accepts unwrapped.accepts(visitor, progress)
159 3677 6132 - 6190 TypeApply scala.Any.isInstanceOf collection.isInstanceOf[org.geotools.feature.collection.DecoratingSimpleFeatureCollection]
160 3678 6200 - 6267 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.getDelegate GeoMesaFeatureCollection.this.getDelegate(collection, classOf[org.geotools.feature.collection.DecoratingSimpleFeatureCollection])
160 3679 6200 - 6267 Block org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.getDelegate GeoMesaFeatureCollection.this.getDelegate(collection, classOf[org.geotools.feature.collection.DecoratingSimpleFeatureCollection])
161 3680 6283 - 6369 TypeApply scala.Any.isInstanceOf collection.isInstanceOf[org.geotools.feature.collection.DecoratingFeatureCollection[org.geotools.api.feature.simple.SimpleFeatureType,org.geotools.api.feature.simple.SimpleFeature]]
161 3684 6279 - 6628 If <nosymbol> if (collection.isInstanceOf[org.geotools.feature.collection.DecoratingFeatureCollection[org.geotools.api.feature.simple.SimpleFeatureType,org.geotools.api.feature.simple.SimpleFeature]]) GeoMesaFeatureCollection.this.getDelegate(collection, classOf[org.geotools.feature.collection.DecoratingFeatureCollection]) else { (if (GeoMesaFeatureCollection.this.logger.underlying.isDebugEnabled()) GeoMesaFeatureCollection.this.logger.underlying.debug("Unable to unwrap feature collection {} of class {}", (scala.Array.apply[AnyRef]((collection: AnyRef), (collection.getClass().getName(): AnyRef))((ClassTag.AnyRef: scala.reflect.ClassTag[AnyRef])): _*)) else (): Unit); return collection }
162 3681 6379 - 6474 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.getDelegate GeoMesaFeatureCollection.this.getDelegate(collection, classOf[org.geotools.feature.collection.DecoratingFeatureCollection])
162 3682 6379 - 6474 Block org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.getDelegate GeoMesaFeatureCollection.this.getDelegate(collection, classOf[org.geotools.feature.collection.DecoratingFeatureCollection])
163 3683 6486 - 6628 Block <nosymbol> { (if (GeoMesaFeatureCollection.this.logger.underlying.isDebugEnabled()) GeoMesaFeatureCollection.this.logger.underlying.debug("Unable to unwrap feature collection {} of class {}", (scala.Array.apply[AnyRef]((collection: AnyRef), (collection.getClass().getName(): AnyRef))((ClassTag.AnyRef: scala.reflect.ClassTag[AnyRef])): _*)) else (): Unit); return collection }
171 3685 6808 - 6864 TypeApply scala.Any.isInstanceOf unwrapped.isInstanceOf[org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection]
172 3686 6874 - 6883 Ident org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.unwrapped unwrapped
173 3687 6899 - 6908 Apply scala.Int.> level.>(9)
173 3688 6910 - 7014 Block <nosymbol> { (if (GeoMesaFeatureCollection.this.logger.underlying.isDebugEnabled()) GeoMesaFeatureCollection.this.logger.underlying.debug("Aborting feature collection unwrapping after 10 iterations") else (): Unit); unwrapped }
173 3692 6895 - 7062 If <nosymbol> if (level.>(9)) { (if (GeoMesaFeatureCollection.this.logger.underlying.isDebugEnabled()) GeoMesaFeatureCollection.this.logger.underlying.debug("Aborting feature collection unwrapping after 10 iterations") else (): Unit); unwrapped } else GeoMesaFeatureCollection.this.unwrap(unwrapped, level.+(1))
177 3689 7046 - 7055 Apply scala.Int.+ level.+(1)
177 3690 7028 - 7056 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.unwrap GeoMesaFeatureCollection.this.unwrap(unwrapped, level.+(1))
177 3691 7028 - 7056 Block org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.unwrap GeoMesaFeatureCollection.this.unwrap(unwrapped, level.+(1))
191 3693 7496 - 7529 Apply java.lang.Class.getDeclaredField clas.getDeclaredField("delegate")
192 3694 7534 - 7555 Apply java.lang.reflect.Field.setAccessible m.setAccessible(true)
193 3695 7560 - 7643 TypeApply scala.Any.asInstanceOf m.get(collection).asInstanceOf[org.geotools.feature.FeatureCollection[org.geotools.api.feature.simple.SimpleFeatureType,org.geotools.api.feature.simple.SimpleFeature]]
209 3696 8214 - 8230 Apply java.lang.Object.!= progress.!=(null)
209 3701 8210 - 8210 Literal <nosymbol> ()
209 3702 8210 - 8210 Block <nosymbol> ()
210 3697 8267 - 8283 Apply java.lang.Class.getName GeoMesaFeatureVisitingCollection.this.getClass().getName()
210 3698 8285 - 8296 Literal <nosymbol> "accepts()"
210 3699 8242 - 8306 Apply org.geotools.api.util.ProgressListener.warningOccurred progress.warningOccurred(GeoMesaFeatureVisitingCollection.this.getClass().getName(), "accepts()", warning)
210 3700 8242 - 8306 Block org.geotools.api.util.ProgressListener.warningOccurred progress.warningOccurred(GeoMesaFeatureVisitingCollection.this.getClass().getName(), "accepts()", warning)
212 3703 8321 - 8353 Apply org.geotools.data.store.DataFeatureCollection.accepts GeoMesaFeatureVisitingCollection.super.accepts(visitor, progress)
218 3704 8532 - 8538 Select org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.source GeoMesaFeatureVisitingCollection.this.source
218 3705 8540 - 8545 Select org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.query GeoMesaFeatureVisitingCollection.this.query
218 3706 8522 - 8546 Apply org.locationtech.geomesa.index.process.GeoMesaProcessVisitor.execute v.execute(GeoMesaFeatureVisitingCollection.this.source, GeoMesaFeatureVisitingCollection.this.query)
218 3707 8522 - 8546 Block org.locationtech.geomesa.index.process.GeoMesaProcessVisitor.execute v.execute(GeoMesaFeatureVisitingCollection.this.source, GeoMesaFeatureVisitingCollection.this.query)
220 3708 8582 - 8624 TypeApply scala.Any.isInstanceOf v.getExpression().isInstanceOf[org.geotools.api.filter.expression.PropertyName]
220 3728 8625 - 9095 Block <nosymbol> { val attribute: String = v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName(); val stat: String = org.locationtech.geomesa.utils.stats.Stat.DescriptiveStats(scala.collection.Seq.apply[String](attribute)); GeoMesaFeatureVisitingCollection.this.stats.getStat[org.locationtech.geomesa.utils.stats.DescriptiveStats](GeoMesaFeatureVisitingCollection.this.source.getSchema(), stat, GeoMesaFeatureVisitingCollection.this.query.getFilter(), true) match { case (value: org.locationtech.geomesa.utils.stats.DescriptiveStats)Some[org.locationtech.geomesa.utils.stats.DescriptiveStats]((s @ _)) if s.count.<=(2147483647.toLong) => v.setValue(s.count.toInt, s.sum.apply(0)) case (value: org.locationtech.geomesa.utils.stats.DescriptiveStats)Some[org.locationtech.geomesa.utils.stats.DescriptiveStats]((s @ _)) => v.setValue(s.mean.apply(0)) case scala.None => GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress) } }
221 3709 8654 - 8712 Apply org.geotools.api.filter.expression.PropertyName.getPropertyName v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName()
222 3710 8756 - 8770 Apply scala.collection.generic.GenericCompanion.apply scala.collection.Seq.apply[String](attribute)
222 3711 8734 - 8771 Apply org.locationtech.geomesa.utils.stats.Stat.DescriptiveStats org.locationtech.geomesa.utils.stats.Stat.DescriptiveStats(scala.collection.Seq.apply[String](attribute))
223 3712 8814 - 8830 Apply org.geotools.api.data.FeatureSource.getSchema GeoMesaFeatureVisitingCollection.this.source.getSchema()
223 3713 8838 - 8853 Apply org.geotools.api.data.Query.getFilter GeoMesaFeatureVisitingCollection.this.query.getFilter()
223 3714 8863 - 8867 Literal <nosymbol> true
223 3715 8782 - 8868 Apply org.locationtech.geomesa.index.stats.GeoMesaStats.getStat GeoMesaFeatureVisitingCollection.this.stats.getStat[org.locationtech.geomesa.utils.stats.DescriptiveStats](GeoMesaFeatureVisitingCollection.this.source.getSchema(), stat, GeoMesaFeatureVisitingCollection.this.query.getFilter(), true)
224 3716 8916 - 8928 Literal <nosymbol> 2147483647
224 3717 8916 - 8935 Select scala.Int.toLong 2147483647.toLong
224 3718 8905 - 8935 Apply scala.Long.<= s.count.<=(2147483647.toLong)
224 3719 8950 - 8963 Select scala.Long.toInt s.count.toInt
224 3720 8965 - 8973 Apply scala.Array.apply s.sum.apply(0)
224 3721 8939 - 8974 Apply org.geotools.feature.visitor.AverageVisitor.setValue v.setValue(s.count.toInt, s.sum.apply(0))
224 3722 8939 - 8974 Block org.geotools.feature.visitor.AverageVisitor.setValue v.setValue(s.count.toInt, s.sum.apply(0))
225 3723 9014 - 9023 Apply scala.Array.apply s.mean.apply(0)
225 3724 9003 - 9024 Apply org.geotools.feature.visitor.AverageVisitor.setValue v.setValue(s.mean.apply(0))
225 3725 9003 - 9024 Block org.geotools.feature.visitor.AverageVisitor.setValue v.setValue(s.mean.apply(0))
226 3726 9053 - 9083 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
226 3727 9053 - 9083 Block org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
230 3729 9184 - 9200 Apply org.geotools.api.data.FeatureSource.getSchema GeoMesaFeatureVisitingCollection.this.source.getSchema()
230 3730 9202 - 9217 Apply org.geotools.api.data.Query.getFilter GeoMesaFeatureVisitingCollection.this.query.getFilter()
230 3731 9168 - 9218 Apply org.locationtech.geomesa.index.stats.GeoMesaStats.getBounds GeoMesaFeatureVisitingCollection.this.stats.getBounds(GeoMesaFeatureVisitingCollection.this.source.getSchema(), GeoMesaFeatureVisitingCollection.this.query.getFilter(), GeoMesaFeatureVisitingCollection.this.stats.getBounds$default$3)
230 3732 9140 - 9219 Apply org.geotools.geometry.jts.ReferencedEnvelope.expandToInclude v.getBounds().expandToInclude(GeoMesaFeatureVisitingCollection.this.stats.getBounds(GeoMesaFeatureVisitingCollection.this.source.getSchema(), GeoMesaFeatureVisitingCollection.this.query.getFilter(), GeoMesaFeatureVisitingCollection.this.stats.getBounds$default$3))
230 3733 9140 - 9219 Block org.geotools.geometry.jts.ReferencedEnvelope.expandToInclude v.getBounds().expandToInclude(GeoMesaFeatureVisitingCollection.this.stats.getBounds(GeoMesaFeatureVisitingCollection.this.source.getSchema(), GeoMesaFeatureVisitingCollection.this.query.getFilter(), GeoMesaFeatureVisitingCollection.this.stats.getBounds$default$3))
233 3734 9290 - 9295 Select org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.query GeoMesaFeatureVisitingCollection.this.query
233 3735 9274 - 9296 Apply org.geotools.api.data.FeatureSource.getCount GeoMesaFeatureVisitingCollection.this.source.getCount(GeoMesaFeatureVisitingCollection.this.query)
233 3736 9263 - 9297 Apply org.geotools.feature.visitor.CountVisitor.setValue v.setValue(GeoMesaFeatureVisitingCollection.this.source.getCount(GeoMesaFeatureVisitingCollection.this.query))
233 3737 9263 - 9297 Block org.geotools.feature.visitor.CountVisitor.setValue v.setValue(GeoMesaFeatureVisitingCollection.this.source.getCount(GeoMesaFeatureVisitingCollection.this.query))
235 3738 9329 - 9371 TypeApply scala.Any.isInstanceOf v.getExpression().isInstanceOf[org.geotools.api.filter.expression.PropertyName]
235 3747 9372 - 9679 Block <nosymbol> { val attribute: String = v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName(); GeoMesaFeatureVisitingCollection.this.minMax(attribute, false).orElse[(Any, Any)](GeoMesaFeatureVisitingCollection.this.minMax(attribute, true)) match { case (value: (Any, Any))Some[(Any, Any)]((_1: Any, _2: Any)(Any, Any)(_, (max @ _))) => v.setValue(max) case scala.None => GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress) } }
236 3739 9401 - 9459 Apply org.geotools.api.filter.expression.PropertyName.getPropertyName v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName()
237 3740 9496 - 9501 Literal <nosymbol> false
237 3741 9510 - 9541 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.minMax GeoMesaFeatureVisitingCollection.this.minMax(attribute, true)
237 3742 9470 - 9542 Apply scala.Option.orElse GeoMesaFeatureVisitingCollection.this.minMax(attribute, false).orElse[(Any, Any)](GeoMesaFeatureVisitingCollection.this.minMax(attribute, true))
238 3743 9586 - 9601 Apply org.geotools.feature.visitor.MaxVisitor.setValue v.setValue(max)
238 3744 9586 - 9601 Block org.geotools.feature.visitor.MaxVisitor.setValue v.setValue(max)
239 3745 9637 - 9667 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
239 3746 9637 - 9667 Block org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
242 3748 9715 - 9757 TypeApply scala.Any.isInstanceOf v.getExpression().isInstanceOf[org.geotools.api.filter.expression.PropertyName]
242 3758 9758 - 10071 Block <nosymbol> { val attribute: String = v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName(); GeoMesaFeatureVisitingCollection.this.groupBy(attribute, scala.collection.JavaConverters.asScalaBufferConverter[org.geotools.api.filter.expression.Expression](v.getGroupByAttributes()).asScala.toSeq, v.getAggregateVisitor()) match { case (value: java.util.List[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult])Some[java.util.List[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult]]((result @ _)) => v.setValue(result) case scala.None => GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress) } }
243 3749 9787 - 9845 Apply org.geotools.api.filter.expression.PropertyName.getPropertyName v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName()
244 3750 9875 - 9897 Apply org.geotools.feature.visitor.GroupByVisitor.getGroupByAttributes v.getGroupByAttributes()
244 3751 9875 - 9911 Select scala.collection.SeqLike.toSeq scala.collection.JavaConverters.asScalaBufferConverter[org.geotools.api.filter.expression.Expression](v.getGroupByAttributes()).asScala.toSeq
244 3752 9913 - 9934 Apply org.geotools.feature.visitor.GroupByVisitor.getAggregateVisitor v.getAggregateVisitor()
244 3753 9856 - 9935 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.groupBy GeoMesaFeatureVisitingCollection.this.groupBy(attribute, scala.collection.JavaConverters.asScalaBufferConverter[org.geotools.api.filter.expression.Expression](v.getGroupByAttributes()).asScala.toSeq, v.getAggregateVisitor())
245 3754 9977 - 9995 Apply org.geotools.feature.visitor.GroupByVisitor.setValue v.setValue(result)
245 3755 9977 - 9995 Block org.geotools.feature.visitor.GroupByVisitor.setValue v.setValue(result)
246 3756 10029 - 10059 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
246 3757 10029 - 10059 Block org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
249 3759 10103 - 10145 TypeApply scala.Any.isInstanceOf v.getExpression().isInstanceOf[org.geotools.api.filter.expression.PropertyName]
249 3768 10146 - 10453 Block <nosymbol> { val attribute: String = v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName(); GeoMesaFeatureVisitingCollection.this.minMax(attribute, false).orElse[(Any, Any)](GeoMesaFeatureVisitingCollection.this.minMax(attribute, true)) match { case (value: (Any, Any))Some[(Any, Any)]((_1: Any, _2: Any)(Any, Any)((min @ _), _)) => v.setValue(min) case scala.None => GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress) } }
250 3760 10175 - 10233 Apply org.geotools.api.filter.expression.PropertyName.getPropertyName v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName()
251 3761 10270 - 10275 Literal <nosymbol> false
251 3762 10284 - 10315 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.minMax GeoMesaFeatureVisitingCollection.this.minMax(attribute, true)
251 3763 10244 - 10316 Apply scala.Option.orElse GeoMesaFeatureVisitingCollection.this.minMax(attribute, false).orElse[(Any, Any)](GeoMesaFeatureVisitingCollection.this.minMax(attribute, true))
252 3764 10360 - 10375 Apply org.geotools.feature.visitor.MinVisitor.setValue v.setValue(min)
252 3765 10360 - 10375 Block org.geotools.feature.visitor.MinVisitor.setValue v.setValue(min)
253 3766 10411 - 10441 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
253 3767 10411 - 10441 Block org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
256 3769 10485 - 10527 TypeApply scala.Any.isInstanceOf v.getExpression().isInstanceOf[org.geotools.api.filter.expression.PropertyName]
256 3782 10528 - 10899 Block <nosymbol> { val attribute: String = v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName(); val stat: String = org.locationtech.geomesa.utils.stats.Stat.DescriptiveStats(scala.collection.Seq.apply[String](attribute)); GeoMesaFeatureVisitingCollection.this.stats.getStat[org.locationtech.geomesa.utils.stats.DescriptiveStats](GeoMesaFeatureVisitingCollection.this.source.getSchema(), stat, GeoMesaFeatureVisitingCollection.this.query.getFilter(), true) match { case (value: org.locationtech.geomesa.utils.stats.DescriptiveStats)Some[org.locationtech.geomesa.utils.stats.DescriptiveStats]((s @ _)) => v.setValue(s.sum.apply(0)) case scala.None => GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress) } }
257 3770 10557 - 10615 Apply org.geotools.api.filter.expression.PropertyName.getPropertyName v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName()
258 3771 10659 - 10673 Apply scala.collection.generic.GenericCompanion.apply scala.collection.Seq.apply[String](attribute)
258 3772 10637 - 10674 Apply org.locationtech.geomesa.utils.stats.Stat.DescriptiveStats org.locationtech.geomesa.utils.stats.Stat.DescriptiveStats(scala.collection.Seq.apply[String](attribute))
259 3773 10717 - 10733 Apply org.geotools.api.data.FeatureSource.getSchema GeoMesaFeatureVisitingCollection.this.source.getSchema()
259 3774 10741 - 10756 Apply org.geotools.api.data.Query.getFilter GeoMesaFeatureVisitingCollection.this.query.getFilter()
259 3775 10766 - 10770 Literal <nosymbol> true
259 3776 10685 - 10771 Apply org.locationtech.geomesa.index.stats.GeoMesaStats.getStat GeoMesaFeatureVisitingCollection.this.stats.getStat[org.locationtech.geomesa.utils.stats.DescriptiveStats](GeoMesaFeatureVisitingCollection.this.source.getSchema(), stat, GeoMesaFeatureVisitingCollection.this.query.getFilter(), true)
260 3777 10819 - 10827 Apply scala.Array.apply s.sum.apply(0)
260 3778 10808 - 10828 Apply org.geotools.feature.visitor.SumVisitor.setValue v.setValue(s.sum.apply(0))
260 3779 10808 - 10828 Block org.geotools.feature.visitor.SumVisitor.setValue v.setValue(s.sum.apply(0))
261 3780 10857 - 10887 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
261 3781 10857 - 10887 Block org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
264 3783 10934 - 10976 TypeApply scala.Any.isInstanceOf v.getExpression().isInstanceOf[org.geotools.api.filter.expression.PropertyName]
264 3796 10977 - 11356 Block <nosymbol> { val attribute: String = v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName(); val stat: String = org.locationtech.geomesa.utils.stats.Stat.Enumeration(attribute); GeoMesaFeatureVisitingCollection.this.stats.getStat[org.locationtech.geomesa.utils.stats.EnumerationStat[Any]](GeoMesaFeatureVisitingCollection.this.source.getSchema(), stat, GeoMesaFeatureVisitingCollection.this.query.getFilter(), true) match { case (value: org.locationtech.geomesa.utils.stats.EnumerationStat[Any])Some[org.locationtech.geomesa.utils.stats.EnumerationStat[Any]]((s @ _)) => v.setValue(scala.collection.JavaConverters.seqAsJavaListConverter[Any](s.values.toList).asJava) case scala.None => GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress) } }
265 3784 11006 - 11064 Apply org.geotools.api.filter.expression.PropertyName.getPropertyName v.getExpression().asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName()
266 3785 11086 - 11113 Apply org.locationtech.geomesa.utils.stats.Stat.Enumeration org.locationtech.geomesa.utils.stats.Stat.Enumeration(attribute)
267 3786 11160 - 11176 Apply org.geotools.api.data.FeatureSource.getSchema GeoMesaFeatureVisitingCollection.this.source.getSchema()
267 3787 11184 - 11199 Apply org.geotools.api.data.Query.getFilter GeoMesaFeatureVisitingCollection.this.query.getFilter()
267 3788 11209 - 11213 Literal <nosymbol> true
267 3789 11124 - 11214 Apply org.locationtech.geomesa.index.stats.GeoMesaStats.getStat GeoMesaFeatureVisitingCollection.this.stats.getStat[org.locationtech.geomesa.utils.stats.EnumerationStat[Any]](GeoMesaFeatureVisitingCollection.this.source.getSchema(), stat, GeoMesaFeatureVisitingCollection.this.query.getFilter(), true)
268 3790 11262 - 11277 Select scala.collection.TraversableOnce.toList s.values.toList
268 3791 11262 - 11284 Select scala.collection.convert.Decorators.AsJava.asJava scala.collection.JavaConverters.seqAsJavaListConverter[Any](s.values.toList).asJava
268 3792 11251 - 11285 Apply org.geotools.feature.visitor.UniqueVisitor.setValue v.setValue(scala.collection.JavaConverters.seqAsJavaListConverter[Any](s.values.toList).asJava)
268 3793 11251 - 11285 Block org.geotools.feature.visitor.UniqueVisitor.setValue v.setValue(scala.collection.JavaConverters.seqAsJavaListConverter[Any](s.values.toList).asJava)
269 3794 11314 - 11344 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
269 3795 11314 - 11344 Block org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
273 3797 11386 - 11416 Apply org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
273 3798 11386 - 11416 Block org.locationtech.geomesa.index.geotools.GeoMesaFeatureCollection.GeoMesaFeatureVisitingCollection.unoptimized GeoMesaFeatureVisitingCollection.this.unoptimized(visitor, progress)
278 3799 11539 - 11555 Apply org.geotools.api.data.FeatureSource.getSchema GeoMesaFeatureVisitingCollection.this.source.getSchema()
278 3800 11568 - 11583 Apply org.geotools.api.data.Query.getFilter GeoMesaFeatureVisitingCollection.this.query.getFilter()
278 3801 11596 - 11604 Select org.locationtech.geomesa.utils.stats.MinMax.bounds x$4.bounds
278 3802 11518 - 11605 Apply scala.Option.map GeoMesaFeatureVisitingCollection.this.stats.getMinMax[Any](GeoMesaFeatureVisitingCollection.this.source.getSchema(), attribute, GeoMesaFeatureVisitingCollection.this.query.getFilter(), exact).map[(Any, Any)](((x$4: org.locationtech.geomesa.utils.stats.MinMax[Any]) => x$4.bounds))
284 3803 11826 - 11827 Literal <nosymbol> 1
284 3804 11832 - 11833 Literal <nosymbol> 0
285 3805 11877 - 11906 Select scala.Boolean.unary_! e.isInstanceOf[org.geotools.api.filter.expression.PropertyName].unary_!
285 3806 11847 - 11907 Apply scala.collection.IterableLike.exists groupByExpression.exists(((e: org.geotools.api.filter.expression.Expression) => e.isInstanceOf[org.geotools.api.filter.expression.PropertyName].unary_!))
285 3807 11794 - 11907 Apply scala.Boolean.|| groupByExpression.lengthCompare(1).!=(0).||(groupByExpression.exists(((e: org.geotools.api.filter.expression.Expression) => e.isInstanceOf[org.geotools.api.filter.expression.PropertyName].unary_!)))
285 3808 11911 - 11915 Select scala.None scala.None
285 3809 11911 - 11915 Block scala.None scala.None
285 3847 11923 - 13036 Block <nosymbol> { val groupBy: String = groupByExpression.map[String, Seq[String]](((x$5: org.geotools.api.filter.expression.Expression) => x$5.asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName()))(collection.this.Seq.canBuildFrom[String]).head; val op: Option[(String, org.locationtech.geomesa.utils.stats.Stat => Any)] = aggregate match { case (_: org.geotools.feature.visitor.CountVisitor) => scala.Some.apply[(String, org.locationtech.geomesa.utils.stats.Stat => Int)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.Count()).->[org.locationtech.geomesa.utils.stats.Stat => Int](((s: org.locationtech.geomesa.utils.stats.Stat) => scala.math.`package`.min(s.asInstanceOf[org.locationtech.geomesa.utils.stats.CountStat].count, 2147483647.toLong).toInt))) case (_: org.geotools.feature.visitor.MaxVisitor) => scala.Some.apply[(String, org.locationtech.geomesa.utils.stats.Stat => Any)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.MinMax(attribute)).->[org.locationtech.geomesa.utils.stats.Stat => Any](((s: org.locationtech.geomesa.utils.stats.Stat) => s.asInstanceOf[org.locationtech.geomesa.utils.stats.MinMax[Any]].max))) case (_: org.geotools.feature.visitor.MinVisitor) => scala.Some.apply[(String, org.locationtech.geomesa.utils.stats.Stat => Any)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.MinMax(attribute)).->[org.locationtech.geomesa.utils.stats.Stat => Any](((s: org.locationtech.geomesa.utils.stats.Stat) => s.asInstanceOf[org.locationtech.geomesa.utils.stats.MinMax[Any]].min))) case _ => scala.None }; op.flatMap[java.util.List[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult]](((x0$1: (String, org.locationtech.geomesa.utils.stats.Stat => Any)) => x0$1 match { case (_1: String, _2: org.locationtech.geomesa.utils.stats.Stat => Any)(String, org.locationtech.geomesa.utils.stats.Stat => Any)((nested @ _), (unwrap @ _)) => { val stat: String = org.locationtech.geomesa.utils.stats.Stat.GroupBy(groupBy, nested); GeoMesaFeatureVisitingCollection.this.stats.getStat[org.locationtech.geomesa.utils.stats.GroupBy[AnyRef]](GeoMesaFeatureVisitingCollection.this.source.getSchema(), stat, GeoMesaFeatureVisitingCollection.this.query.getFilter(), true).map[java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult]](((grouped: org.locationtech.geomesa.utils.stats.GroupBy[AnyRef]) => { val result: java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult] = new java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult](); grouped.iterator.foreach[Boolean](((x0$2: (AnyRef, org.locationtech.geomesa.utils.stats.Stat)) => x0$2 match { case (_1: AnyRef, _2: org.locationtech.geomesa.utils.stats.Stat)(AnyRef, org.locationtech.geomesa.utils.stats.Stat)((group @ _), (stat @ _)) => result.add(new org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult(java.util.Collections.singletonList[AnyRef](group), unwrap.apply(stat))) })); result })) } })) }
286 3810 11969 - 12013 Apply org.geotools.api.filter.expression.PropertyName.getPropertyName x$5.asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName()
286 3811 11968 - 11968 TypeApply scala.collection.Seq.canBuildFrom collection.this.Seq.canBuildFrom[String]
286 3812 11947 - 12019 Select scala.collection.IterableLike.head groupByExpression.map[String, Seq[String]](((x$5: org.geotools.api.filter.expression.Expression) => x$5.asInstanceOf[org.geotools.api.filter.expression.PropertyName].getPropertyName()))(collection.this.Seq.canBuildFrom[String]).head
289 3813 12137 - 12149 Apply org.locationtech.geomesa.utils.stats.Stat.Count org.locationtech.geomesa.utils.stats.Stat.Count()
289 3814 12178 - 12209 Select org.locationtech.geomesa.utils.stats.CountStat.count s.asInstanceOf[org.locationtech.geomesa.utils.stats.CountStat].count
289 3815 12211 - 12223 Literal <nosymbol> 2147483647
289 3816 12211 - 12230 Select scala.Int.toLong 2147483647.toLong
289 3817 12168 - 12237 Select scala.Long.toInt scala.math.`package`.min(s.asInstanceOf[org.locationtech.geomesa.utils.stats.CountStat].count, 2147483647.toLong).toInt
289 3818 12137 - 12239 Apply scala.Predef.ArrowAssoc.-> scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.Count()).->[org.locationtech.geomesa.utils.stats.Stat => Int](((s: org.locationtech.geomesa.utils.stats.Stat) => scala.math.`package`.min(s.asInstanceOf[org.locationtech.geomesa.utils.stats.CountStat].count, 2147483647.toLong).toInt))
289 3819 12132 - 12240 Apply scala.Some.apply scala.Some.apply[(String, org.locationtech.geomesa.utils.stats.Stat => Int)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.Count()).->[org.locationtech.geomesa.utils.stats.Stat => Int](((s: org.locationtech.geomesa.utils.stats.Stat) => scala.math.`package`.min(s.asInstanceOf[org.locationtech.geomesa.utils.stats.CountStat].count, 2147483647.toLong).toInt)))
289 3820 12132 - 12240 Block scala.Some.apply scala.Some.apply[(String, org.locationtech.geomesa.utils.stats.Stat => Int)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.Count()).->[org.locationtech.geomesa.utils.stats.Stat => Int](((s: org.locationtech.geomesa.utils.stats.Stat) => scala.math.`package`.min(s.asInstanceOf[org.locationtech.geomesa.utils.stats.CountStat].count, 2147483647.toLong).toInt)))
292 3821 12291 - 12313 Apply org.locationtech.geomesa.utils.stats.Stat.MinMax org.locationtech.geomesa.utils.stats.Stat.MinMax(attribute)
292 3822 12332 - 12363 Select org.locationtech.geomesa.utils.stats.MinMax.max s.asInstanceOf[org.locationtech.geomesa.utils.stats.MinMax[Any]].max
292 3823 12291 - 12365 Apply scala.Predef.ArrowAssoc.-> scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.MinMax(attribute)).->[org.locationtech.geomesa.utils.stats.Stat => Any](((s: org.locationtech.geomesa.utils.stats.Stat) => s.asInstanceOf[org.locationtech.geomesa.utils.stats.MinMax[Any]].max))
292 3824 12286 - 12366 Apply scala.Some.apply scala.Some.apply[(String, org.locationtech.geomesa.utils.stats.Stat => Any)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.MinMax(attribute)).->[org.locationtech.geomesa.utils.stats.Stat => Any](((s: org.locationtech.geomesa.utils.stats.Stat) => s.asInstanceOf[org.locationtech.geomesa.utils.stats.MinMax[Any]].max)))
292 3825 12286 - 12366 Block scala.Some.apply scala.Some.apply[(String, org.locationtech.geomesa.utils.stats.Stat => Any)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.MinMax(attribute)).->[org.locationtech.geomesa.utils.stats.Stat => Any](((s: org.locationtech.geomesa.utils.stats.Stat) => s.asInstanceOf[org.locationtech.geomesa.utils.stats.MinMax[Any]].max)))
295 3826 12417 - 12439 Apply org.locationtech.geomesa.utils.stats.Stat.MinMax org.locationtech.geomesa.utils.stats.Stat.MinMax(attribute)
295 3827 12458 - 12489 Select org.locationtech.geomesa.utils.stats.MinMax.min s.asInstanceOf[org.locationtech.geomesa.utils.stats.MinMax[Any]].min
295 3828 12417 - 12491 Apply scala.Predef.ArrowAssoc.-> scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.MinMax(attribute)).->[org.locationtech.geomesa.utils.stats.Stat => Any](((s: org.locationtech.geomesa.utils.stats.Stat) => s.asInstanceOf[org.locationtech.geomesa.utils.stats.MinMax[Any]].min))
295 3829 12412 - 12492 Apply scala.Some.apply scala.Some.apply[(String, org.locationtech.geomesa.utils.stats.Stat => Any)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.MinMax(attribute)).->[org.locationtech.geomesa.utils.stats.Stat => Any](((s: org.locationtech.geomesa.utils.stats.Stat) => s.asInstanceOf[org.locationtech.geomesa.utils.stats.MinMax[Any]].min)))
295 3830 12412 - 12492 Block scala.Some.apply scala.Some.apply[(String, org.locationtech.geomesa.utils.stats.Stat => Any)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.utils.stats.Stat.MinMax(attribute)).->[org.locationtech.geomesa.utils.stats.Stat => Any](((s: org.locationtech.geomesa.utils.stats.Stat) => s.asInstanceOf[org.locationtech.geomesa.utils.stats.MinMax[Any]].min)))
298 3831 12526 - 12530 Select scala.None scala.None
298 3832 12526 - 12530 Block scala.None scala.None
300 3845 12584 - 13018 Block <nosymbol> { val stat: String = org.locationtech.geomesa.utils.stats.Stat.GroupBy(groupBy, nested); GeoMesaFeatureVisitingCollection.this.stats.getStat[org.locationtech.geomesa.utils.stats.GroupBy[AnyRef]](GeoMesaFeatureVisitingCollection.this.source.getSchema(), stat, GeoMesaFeatureVisitingCollection.this.query.getFilter(), true).map[java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult]](((grouped: org.locationtech.geomesa.utils.stats.GroupBy[AnyRef]) => { val result: java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult] = new java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult](); grouped.iterator.foreach[Boolean](((x0$2: (AnyRef, org.locationtech.geomesa.utils.stats.Stat)) => x0$2 match { case (_1: AnyRef, _2: org.locationtech.geomesa.utils.stats.Stat)(AnyRef, org.locationtech.geomesa.utils.stats.Stat)((group @ _), (stat @ _)) => result.add(new org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult(java.util.Collections.singletonList[AnyRef](group), unwrap.apply(stat))) })); result })) }
300 3846 12549 - 13028 Apply scala.Option.flatMap op.flatMap[java.util.List[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult]](((x0$1: (String, org.locationtech.geomesa.utils.stats.Stat => Any)) => x0$1 match { case (_1: String, _2: org.locationtech.geomesa.utils.stats.Stat => Any)(String, org.locationtech.geomesa.utils.stats.Stat => Any)((nested @ _), (unwrap @ _)) => { val stat: String = org.locationtech.geomesa.utils.stats.Stat.GroupBy(groupBy, nested); GeoMesaFeatureVisitingCollection.this.stats.getStat[org.locationtech.geomesa.utils.stats.GroupBy[AnyRef]](GeoMesaFeatureVisitingCollection.this.source.getSchema(), stat, GeoMesaFeatureVisitingCollection.this.query.getFilter(), true).map[java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult]](((grouped: org.locationtech.geomesa.utils.stats.GroupBy[AnyRef]) => { val result: java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult] = new java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult](); grouped.iterator.foreach[Boolean](((x0$2: (AnyRef, org.locationtech.geomesa.utils.stats.Stat)) => x0$2 match { case (_1: AnyRef, _2: org.locationtech.geomesa.utils.stats.Stat)(AnyRef, org.locationtech.geomesa.utils.stats.Stat)((group @ _), (stat @ _)) => result.add(new org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult(java.util.Collections.singletonList[AnyRef](group), unwrap.apply(stat))) })); result })) } }))
301 3833 12608 - 12637 Apply org.locationtech.geomesa.utils.stats.Stat.GroupBy org.locationtech.geomesa.utils.stats.Stat.GroupBy(groupBy, nested)
302 3834 12679 - 12695 Apply org.geotools.api.data.FeatureSource.getSchema GeoMesaFeatureVisitingCollection.this.source.getSchema()
302 3835 12703 - 12718 Apply org.geotools.api.data.Query.getFilter GeoMesaFeatureVisitingCollection.this.query.getFilter()
302 3836 12728 - 12732 Literal <nosymbol> true
302 3844 12648 - 13018 Apply scala.Option.map GeoMesaFeatureVisitingCollection.this.stats.getStat[org.locationtech.geomesa.utils.stats.GroupBy[AnyRef]](GeoMesaFeatureVisitingCollection.this.source.getSchema(), stat, GeoMesaFeatureVisitingCollection.this.query.getFilter(), true).map[java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult]](((grouped: org.locationtech.geomesa.utils.stats.GroupBy[AnyRef]) => { val result: java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult] = new java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult](); grouped.iterator.foreach[Boolean](((x0$2: (AnyRef, org.locationtech.geomesa.utils.stats.Stat)) => x0$2 match { case (_1: AnyRef, _2: org.locationtech.geomesa.utils.stats.Stat)(AnyRef, org.locationtech.geomesa.utils.stats.Stat)((group @ _), (stat @ _)) => result.add(new org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult(java.util.Collections.singletonList[AnyRef](group), unwrap.apply(stat))) })); result }))
303 3837 12776 - 12817 Apply java.util.ArrayList.<init> new java.util.ArrayList[org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult]()
304 3843 12830 - 12987 Apply scala.collection.Iterator.foreach grouped.iterator.foreach[Boolean](((x0$2: (AnyRef, org.locationtech.geomesa.utils.stats.Stat)) => x0$2 match { case (_1: AnyRef, _2: org.locationtech.geomesa.utils.stats.Stat)(AnyRef, org.locationtech.geomesa.utils.stats.Stat)((group @ _), (stat @ _)) => result.add(new org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult(java.util.Collections.singletonList[AnyRef](group), unwrap.apply(stat))) }))
305 3838 12925 - 12957 Apply java.util.Collections.singletonList java.util.Collections.singletonList[AnyRef](group)
305 3839 12959 - 12971 Apply scala.Function1.apply unwrap.apply(stat)
305 3840 12904 - 12972 Apply org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult.<init> new org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult(java.util.Collections.singletonList[AnyRef](group), unwrap.apply(stat))
305 3841 12893 - 12973 Apply java.util.ArrayList.add result.add(new org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult(java.util.Collections.singletonList[AnyRef](group), unwrap.apply(stat)))
305 3842 12893 - 12973 Block java.util.ArrayList.add result.add(new org.geotools.feature.visitor.GroupByVisitor.GroupByRawResult(java.util.Collections.singletonList[AnyRef](group), unwrap.apply(stat)))