FeaturesConfig.<init>
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.facebook.presto.sql.analyzer.FeaturesConfig.<init>(Showing top 15 results out of 315)

origin: prestodb/presto

@VisibleForTesting
public TypeRegistry()
{
  this(ImmutableSet.of(), new FeaturesConfig());
}
origin: prestodb/presto

public List<PlanOptimizer> getPlanOptimizers(boolean forceSingleNode)
{
  FeaturesConfig featuresConfig = new FeaturesConfig()
      .setDistributedIndexJoinsEnabled(false)
      .setOptimizeHashGeneration(true);
  return new PlanOptimizers(metadata, sqlParser, featuresConfig, forceSingleNode, new MBeanExporter(new TestingMBeanServer()), statsCalculator).get();
}
origin: prestodb/presto

@Test
public void testIdentityCast()
{
  TypeRegistry typeManager = new TypeRegistry();
  FunctionRegistry registry = new FunctionRegistry(typeManager, new BlockEncodingManager(typeManager), new FeaturesConfig());
  Signature exactOperator = registry.getCoercion(HYPER_LOG_LOG, HYPER_LOG_LOG);
  assertEquals(exactOperator.getName(), mangleOperatorName(OperatorType.CAST.name()));
  assertEquals(transform(exactOperator.getArgumentTypes(), Functions.toStringFunction()), ImmutableList.of(StandardTypes.HYPER_LOG_LOG));
  assertEquals(exactOperator.getReturnType().getBase(), StandardTypes.HYPER_LOG_LOG);
}
origin: prestodb/presto

@Test(timeOut = 10_000)
public void testPossibleExponentialOptimizationTime()
{
  TypeRegistry typeManager = new TypeRegistry();
  ExpressionOptimizer optimizer = new ExpressionOptimizer(new FunctionRegistry(typeManager, new BlockEncodingManager(typeManager), new FeaturesConfig()), typeManager, TEST_SESSION);
  RowExpression expression = constant(1L, BIGINT);
  for (int i = 0; i < 100; i++) {
    Signature signature = internalOperator(OperatorType.ADD.name(), parseTypeSignature(StandardTypes.BIGINT), parseTypeSignature(StandardTypes.BIGINT), parseTypeSignature(StandardTypes.BIGINT));
    expression = new CallExpression(signature, BIGINT, ImmutableList.of(expression, constant(1L, BIGINT)));
  }
  optimizer.optimize(expression);
}
origin: prestodb/presto

@Test
public void testIfConstantOptimization()
{
  TypeRegistry typeManager = new TypeRegistry();
  ExpressionOptimizer optimizer = new ExpressionOptimizer(new FunctionRegistry(typeManager, new BlockEncodingManager(typeManager), new FeaturesConfig()), typeManager, TEST_SESSION);
  assertEquals(optimizer.optimize(ifExpression(constant(true, BOOLEAN), 1L, 2L)), constant(1L, BIGINT));
  assertEquals(optimizer.optimize(ifExpression(constant(false, BOOLEAN), 1L, 2L)), constant(2L, BIGINT));
  assertEquals(optimizer.optimize(ifExpression(constant(null, BOOLEAN), 1L, 2L)), constant(2L, BIGINT));
  Signature bigintEquals = internalOperator(OperatorType.EQUAL.name(), BOOLEAN.getTypeSignature(), BIGINT.getTypeSignature(), BIGINT.getTypeSignature());
  RowExpression condition = new CallExpression(bigintEquals, BOOLEAN, ImmutableList.of(constant(3L, BIGINT), constant(3L, BIGINT)));
  assertEquals(optimizer.optimize(ifExpression(condition, 1L, 2L)), constant(1L, BIGINT));
}
origin: prestodb/presto

private static MetadataManager getMetadata(HistogramGroupImplementation groupMode)
{
  MetadataManager metadata = MetadataManager.createTestMetadataManager(
      new FeaturesConfig()
          .setHistogramGroupImplementation(groupMode));
  return metadata;
}
origin: prestodb/presto

@Test
public void testListingHiddenFunctions()
{
  TypeRegistry typeManager = new TypeRegistry();
  FunctionRegistry registry = new FunctionRegistry(typeManager, new BlockEncodingManager(typeManager), new FeaturesConfig());
  List<SqlFunction> functions = registry.list();
  List<String> names = transform(functions, input -> input.getSignature().getName());
  assertTrue(names.contains("length"), "Expected function names " + names + " to contain 'length'");
  assertTrue(names.contains("stddev"), "Expected function names " + names + " to contain 'stddev'");
  assertTrue(names.contains("rank"), "Expected function names " + names + " to contain 'rank'");
  assertFalse(names.contains("like"), "Expected function names " + names + " not to contain 'like'");
}
origin: prestodb/presto

private Signature resolveSignature()
{
  FunctionRegistry functionRegistry = new FunctionRegistry(typeRegistry, blockEncoding, new FeaturesConfig());
  functionRegistry.addFunctions(createFunctionsFromSignatures());
  return functionRegistry.resolveFunction(QualifiedName.of(TEST_FUNCTION_NAME), fromTypeSignatures(parameterTypes));
}
origin: prestodb/presto

public LocalQueryRunner(Session defaultSession, boolean alwaysRevokeMemory)
{
  this(defaultSession,
      new FeaturesConfig()
          .setOptimizeMixedDistinctAggregations(true),
      false,
      alwaysRevokeMemory);
}
origin: prestodb/presto

@Test(expectedExceptions = IllegalStateException.class, expectedExceptionsMessageRegExp = "'sum' is both an aggregation and a scalar function")
public void testConflictingScalarAggregation()
{
  List<SqlFunction> functions = new FunctionListBuilder()
      .scalars(ScalarSum.class)
      .getFunctions();
  TypeRegistry typeManager = new TypeRegistry();
  FunctionRegistry registry = new FunctionRegistry(typeManager, new BlockEncodingManager(typeManager), new FeaturesConfig());
  registry.addFunctions(functions);
}
origin: prestodb/presto

@BeforeClass
public final void initTestAggregationFunction()
{
  typeRegistry = new TypeRegistry();
  functionRegistry = new FunctionRegistry(typeRegistry, new BlockEncodingManager(typeRegistry), new FeaturesConfig());
}
origin: prestodb/presto

public TestingConnectorContext()
{
  // associate typeManager with a function registry
  new FunctionRegistry(typeManager, new BlockEncodingManager(typeManager), new FeaturesConfig());
}
origin: prestodb/presto

TestSignatureBinder()
{
  // associate typeRegistry with a function registry
  new FunctionRegistry(typeRegistry, new BlockEncodingManager(typeRegistry), new FeaturesConfig());
}
origin: prestodb/presto

public LocalQueryRunner(Session defaultSession)
{
  this(
      defaultSession,
      new FeaturesConfig()
          .setOptimizeMixedDistinctAggregations(true),
      false,
      false);
}
origin: prestodb/presto

  public MetadataManager getMetadata(HistogramGroupImplementation groupMode)
  {
    MetadataManager metadata = MetadataManager.createTestMetadataManager(new FeaturesConfig()
        .setHistogramGroupImplementation(groupMode));

    return metadata;
  }
}
com.facebook.presto.sql.analyzerFeaturesConfig<init>

Popular methods of FeaturesConfig

  • setOptimizeMixedDistinctAggregations
  • setDistributedIndexJoinsEnabled
  • setOptimizeHashGeneration
  • setSpillEnabled
  • setSpillMaxUsedSpaceThreshold
  • setSpillerSpillPaths
  • getAggregationOperatorUnspillMemoryLimit
  • getCpuCostWeight
  • getFilterAndProjectMinOutputPageRowCount
  • getFilterAndProjectMinOutputPageSize
  • getHistogramGroupImplementation
  • getIterativeOptimizerTimeout
  • getHistogramGroupImplementation,
  • getIterativeOptimizerTimeout,
  • getMemoryCostWeight,
  • getMemoryRevokingTarget,
  • getMemoryRevokingThreshold,
  • getNetworkCostWeight,
  • getRe2JDfaRetries,
  • getRe2JDfaStatesLimit,
  • getRegexLibrary

Popular classes and methods

  • compareTo (BigDecimal)
    Compares this BigDecimal with val. Returns one of the three values 1, 0, or -1. The method behaves a
  • getContentResolver (Context)
  • getSystemService (Context)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Socket (java.net)
    Provides a client-side TCP socket.
  • LinkedHashMap (java.util)
    Hash table implementation of the Map interface with predictable iteration order. [Sun docs] [http:/
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JLabel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)