Tabnine Logo
InvertedTopNMetricSpec
Code IndexAdd Tabnine to your IDE (free)

How to use
InvertedTopNMetricSpec
in
org.apache.druid.query.topn

Best Java code snippets using org.apache.druid.query.topn.InvertedTopNMetricSpec (Showing top 12 results out of 315)

origin: apache/incubator-druid

 topNMetricSpec = limitColumn.getDirection() == OrderByColumnSpec.Direction.ASCENDING
          ? baseMetricSpec
          : new InvertedTopNMetricSpec(baseMetricSpec);
} else if (plannerContext.getPlannerConfig().isUseApproximateTopN()) {
          ? new InvertedTopNMetricSpec(baseMetricSpec)
          : baseMetricSpec;
} else {
origin: apache/incubator-druid

@Override
public <T> TopNMetricSpecBuilder<T> configureOptimizer(TopNMetricSpecBuilder<T> builder)
{
 if (!canBeOptimizedUnordered()) {
  return builder;
 }
 return delegate.configureOptimizer(builder);
}
origin: apache/incubator-druid

.granularity(QueryRunnerTestHelper.allGran)
.dimension(QueryRunnerTestHelper.marketDimension)
.metric(new InvertedTopNMetricSpec(new NumericTopNMetricSpec(QueryRunnerTestHelper.indexMetric)))
.threshold(3)
.intervals(QueryRunnerTestHelper.firstToThird)
origin: org.apache.druid/druid-processing

@Override
public <T> TopNMetricSpecBuilder<T> configureOptimizer(TopNMetricSpecBuilder<T> builder)
{
 if (!canBeOptimizedUnordered()) {
  return builder;
 }
 return delegate.configureOptimizer(builder);
}
origin: apache/incubator-druid

.granularity(QueryRunnerTestHelper.allGran)
.dimension(QueryRunnerTestHelper.marketDimension)
.metric(new InvertedTopNMetricSpec(new DimensionTopNMetricSpec("u", StringComparators.LEXICOGRAPHIC)))
.threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird)
origin: apache/incubator-druid

.granularity(QueryRunnerTestHelper.allGran)
.dimension(QueryRunnerTestHelper.marketDimension)
.metric(new InvertedTopNMetricSpec(new DimensionTopNMetricSpec("upfront", StringComparators.LEXICOGRAPHIC)))
.threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird)
origin: apache/incubator-druid

.metric(new InvertedTopNMetricSpec(new DimensionTopNMetricSpec(null, StringComparators.LEXICOGRAPHIC)))
.threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird)
origin: apache/incubator-druid

@Test
public void testSelectDistinctWithSortAsOuterQuery4() throws Exception
{
 testQuery(
   "SELECT * FROM (SELECT DISTINCT dim2 FROM druid.foo ORDER BY dim2 DESC LIMIT 5) LIMIT 10",
   ImmutableList.of(
     new TopNQueryBuilder()
       .dataSource(CalciteTests.DATASOURCE1)
       .intervals(QSS(Filtration.eternity()))
       .granularity(Granularities.ALL)
       .dimension(new DefaultDimensionSpec("dim2", "d0"))
       .metric(new InvertedTopNMetricSpec(new DimensionTopNMetricSpec(null, StringComparators.LEXICOGRAPHIC)))
       .threshold(5)
       .context(QUERY_CONTEXT_DEFAULT)
       .build()
   ),
   NullHandling.replaceWithDefault() ?
   ImmutableList.of(
     new Object[]{""},
     new Object[]{"abc"},
     new Object[]{"a"}
   ) :
   ImmutableList.of(
     new Object[]{null},
     new Object[]{"abc"},
     new Object[]{"a"},
     new Object[]{""}
   )
 );
}
origin: apache/incubator-druid

.metric(new InvertedTopNMetricSpec(new DimensionTopNMetricSpec("u", StringComparators.LEXICOGRAPHIC)))
.threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird)
origin: apache/incubator-druid

.metric(new InvertedTopNMetricSpec(new DimensionTopNMetricSpec("p", StringComparators.LEXICOGRAPHIC)))
.threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird)
origin: apache/incubator-druid

.granularity(Granularities.ALL)
.dimension(new DefaultDimensionSpec("dim1", "d0"))
.metric(new InvertedTopNMetricSpec(new NumericTopNMetricSpec("p0")))
.aggregators(AGGS(
  new FloatMinAggregatorFactory("a0", "m1"),
origin: org.apache.druid/druid-sql

 topNMetricSpec = limitColumn.getDirection() == OrderByColumnSpec.Direction.ASCENDING
          ? baseMetricSpec
          : new InvertedTopNMetricSpec(baseMetricSpec);
} else if (plannerContext.getPlannerConfig().isUseApproximateTopN()) {
          ? new InvertedTopNMetricSpec(baseMetricSpec)
          : baseMetricSpec;
} else {
org.apache.druid.query.topnInvertedTopNMetricSpec

Most used methods

  • <init>
  • canBeOptimizedUnordered

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now