com.facebook.presto.metadata.Metadata.getBlockEncodingSerde()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(182)

本文整理了Java中com.facebook.presto.metadata.Metadata.getBlockEncodingSerde()方法的一些代码示例,展示了Metadata.getBlockEncodingSerde()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Metadata.getBlockEncodingSerde()方法的具体详情如下:
包路径:com.facebook.presto.metadata.Metadata
类名称:Metadata
方法名:getBlockEncodingSerde

Metadata.getBlockEncodingSerde介绍

暂无

代码示例

代码示例来源:origin: prestodb/presto

public FilterStatsCalculator(Metadata metadata, ScalarStatsCalculator scalarStatsCalculator, StatsNormalizer normalizer)
{
  this.metadata = requireNonNull(metadata, "metadata is null");
  this.scalarStatsCalculator = requireNonNull(scalarStatsCalculator, "scalarStatsCalculator is null");
  this.normalizer = requireNonNull(normalizer, "normalizer is null");
  this.literalEncoder = new LiteralEncoder(metadata.getBlockEncodingSerde());
}

代码示例来源:origin: prestodb/presto

public MetadataQueryOptimizer(Metadata metadata)
{
  requireNonNull(metadata, "metadata is null");
  this.metadata = metadata;
  this.literalEncoder = new LiteralEncoder(metadata.getBlockEncodingSerde());
}

代码示例来源:origin: prestodb/presto

private IndexSourceRewriter(SymbolAllocator symbolAllocator, PlanNodeIdAllocator idAllocator, Metadata metadata, Session session)
{
  this.metadata = requireNonNull(metadata, "metadata is null");
  this.domainTranslator = new DomainTranslator(new LiteralEncoder(metadata.getBlockEncodingSerde()));
  this.symbolAllocator = requireNonNull(symbolAllocator, "symbolAllocator is null");
  this.idAllocator = requireNonNull(idAllocator, "idAllocator is null");
  this.session = requireNonNull(session, "session is null");
}

代码示例来源:origin: prestodb/presto

private Visitor(Metadata metadata, Session session, TypeProvider types)
{
  this.metadata = requireNonNull(metadata, "metadata is null");
  this.literalEncoder = new LiteralEncoder(metadata.getBlockEncodingSerde());
  this.session = requireNonNull(session, "session is null");
  this.types = requireNonNull(types, "types is null");
  this.functionInvoker = new InterpretedFunctionInvoker(metadata.getFunctionRegistry());
}

代码示例来源:origin: prestodb/presto

public PickTableLayout(Metadata metadata, SqlParser parser)
{
  this.metadata = requireNonNull(metadata, "metadata is null");
  this.parser = requireNonNull(parser, "parser is null");
  this.domainTranslator = new DomainTranslator(new LiteralEncoder(metadata.getBlockEncodingSerde()));
}

代码示例来源:origin: prestodb/presto

public WindowFilterPushDown(Metadata metadata)
{
  this.metadata = requireNonNull(metadata, "metadata is null");
  this.domainTranslator = new DomainTranslator(new LiteralEncoder(metadata.getBlockEncodingSerde()));
}

代码示例来源:origin: prestodb/presto

private static ExpressionRewriter createRewrite(Metadata metadata, SqlParser sqlParser)
  {
    requireNonNull(metadata, "metadata is null");
    requireNonNull(sqlParser, "sqlParser is null");
    LiteralEncoder literalEncoder = new LiteralEncoder(metadata.getBlockEncodingSerde());

    return (expression, context) -> rewrite(expression, context.getSession(), context.getSymbolAllocator(), metadata, literalEncoder, sqlParser);
  }
}

代码示例来源:origin: prestodb/presto

public PredicatePushDown(Metadata metadata, SqlParser sqlParser)
{
  this.metadata = requireNonNull(metadata, "metadata is null");
  this.literalEncoder = new LiteralEncoder(metadata.getBlockEncodingSerde());
  this.effectivePredicateExtractor = new EffectivePredicateExtractor(new DomainTranslator(literalEncoder));
  this.sqlParser = requireNonNull(sqlParser, "sqlParser is null");
}

代码示例来源:origin: prestodb/presto

private ExpressionInterpreter(Expression expression, Metadata metadata, Session session, Map<NodeRef<Expression>, Type> expressionTypes, boolean optimize)
{
  this.expression = requireNonNull(expression, "expression is null");
  this.metadata = requireNonNull(metadata, "metadata is null");
  this.literalEncoder = new LiteralEncoder(metadata.getBlockEncodingSerde());
  this.session = requireNonNull(session, "session is null").toConnectorSession();
  this.expressionTypes = ImmutableMap.copyOf(requireNonNull(expressionTypes, "expressionTypes is null"));
  verify((expressionTypes.containsKey(NodeRef.of(expression))));
  this.optimize = optimize;
  this.functionInvoker = new InterpretedFunctionInvoker(metadata.getFunctionRegistry());
  this.legacyRowFieldOrdinalAccess = isLegacyRowFieldOrdinalAccessEnabled(session);
  this.visitor = new Visitor();
}

代码示例来源:origin: prestodb/presto

public AddExchanges(Metadata metadata, SqlParser parser)
{
  this.metadata = metadata;
  this.domainTranslator = new DomainTranslator(new LiteralEncoder(metadata.getBlockEncodingSerde()));
  this.parser = parser;
}

代码示例来源:origin: prestodb/presto

@BeforeClass
public void setup()
{
  metadata = createTestMetadataManager();
  literalEncoder = new LiteralEncoder(metadata.getBlockEncodingSerde());
  domainTranslator = new DomainTranslator(literalEncoder);
}

代码示例来源:origin: prestodb/presto

@Test
public void testStackRepresentation()
{
  Block actualBlock = arrayBlockOf(new ArrayType(BIGINT), arrayBlockOf(BIGINT, 1L, 2L), arrayBlockOf(BIGINT, 3L));
  DynamicSliceOutput actualSliceOutput = new DynamicSliceOutput(100);
  writeBlock(functionAssertions.getMetadata().getBlockEncodingSerde(), actualSliceOutput, actualBlock);
  Block expectedBlock = new ArrayType(BIGINT)
      .createBlockBuilder(null, 3)
      .appendStructure(BIGINT.createBlockBuilder(null, 2).writeLong(1).closeEntry().writeLong(2).closeEntry().build())
      .appendStructure(BIGINT.createBlockBuilder(null, 1).writeLong(3).closeEntry().build())
      .build();
  DynamicSliceOutput expectedSliceOutput = new DynamicSliceOutput(100);
  writeBlock(functionAssertions.getMetadata().getBlockEncodingSerde(), expectedSliceOutput, expectedBlock);
  assertEquals(actualSliceOutput.slice(), expectedSliceOutput.slice());
}

代码示例来源:origin: rakam-io/rakam

@Inject
public ExpressionCompiler() {
  TransactionManager transactionManager = TransactionManager.createTestTransactionManager();
  Metadata metadata = MetadataManager.createTestMetadataManager();
  this.serde = metadata.getBlockEncodingSerde();
  this.metadata = metadata;
  this.featuresConfig = new FeaturesConfig();
  this.typeManager = metadata.getTypeManager();
  this.session = Session.builder(new SessionPropertyManager())
      .setIdentity(new Identity("user", Optional.empty()))
      .setTimeZoneKey(TimeZoneKey.UTC_KEY)
      .setLocale(Locale.ENGLISH)
      .setQueryId(QueryId.valueOf("row_expression_compiler"))
      .setTransactionId(transactionManager.beginTransaction(IsolationLevel.REPEATABLE_READ, true, true))
      .build();
  this.expressionOptimizer = new ExpressionOptimizer(metadata.getFunctionRegistry(), metadata.getTypeManager(), session);
}

代码示例来源:origin: prestodb/presto

literalEncoder = new LiteralEncoder(metadata.getBlockEncodingSerde());
domainTranslator = new DomainTranslator(literalEncoder);

相关文章