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

How to use
com.facebook.presto.sql.tree.Row
constructor

Best Java code snippets using com.facebook.presto.sql.tree.Row.<init> (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: prestodb/presto

public static Row row(Expression... values)
{
  return new Row(ImmutableList.copyOf(values));
}
origin: prestodb/presto

private Expression createEmptyColumnStatsRow(String columnName)
{
  ImmutableList.Builder<Expression> rowValues = ImmutableList.builder();
  rowValues.add(new StringLiteral(columnName));
  rowValues.add(NULL_DOUBLE);
  rowValues.add(NULL_DOUBLE);
  rowValues.add(NULL_DOUBLE);
  rowValues.add(NULL_DOUBLE);
  rowValues.add(NULL_VARCHAR);
  rowValues.add(NULL_VARCHAR);
  return new Row(rowValues.build());
}
origin: prestodb/presto

private static Row createTableStatsRow(TableStatistics tableStatistics)
{
  ImmutableList.Builder<Expression> rowValues = ImmutableList.builder();
  rowValues.add(NULL_VARCHAR);
  rowValues.add(NULL_DOUBLE);
  rowValues.add(NULL_DOUBLE);
  rowValues.add(NULL_DOUBLE);
  rowValues.add(createEstimateRepresentation(tableStatistics.getRowCount()));
  rowValues.add(NULL_VARCHAR);
  rowValues.add(NULL_VARCHAR);
  return new Row(rowValues.build());
}
origin: prestodb/presto

private Row createColumnStatsRow(String columnName, Type type, ColumnStatistics columnStatistics)
{
  ImmutableList.Builder<Expression> rowValues = ImmutableList.builder();
  rowValues.add(new StringLiteral(columnName));
  rowValues.add(createEstimateRepresentation(columnStatistics.getDataSize()));
  rowValues.add(createEstimateRepresentation(columnStatistics.getDistinctValuesCount()));
  rowValues.add(createEstimateRepresentation(columnStatistics.getNullsFraction()));
  rowValues.add(NULL_DOUBLE);
  rowValues.add(toStringLiteral(type, columnStatistics.getRange().map(DoubleRange::getMin)));
  rowValues.add(toStringLiteral(type, columnStatistics.getRange().map(DoubleRange::getMax)));
  return new Row(rowValues.build());
}
origin: prestodb/presto

@Override
public Node visitRowConstructor(SqlBaseParser.RowConstructorContext context)
{
  return new Row(getLocation(context), visit(context.expression(), Expression.class));
}
origin: prestodb/presto

@Override
protected Object visitRow(Row node, Object context)
{
  RowType rowType = (RowType) type(node);
  List<Type> parameterTypes = rowType.getTypeParameters();
  List<Expression> arguments = node.getItems();
  int cardinality = arguments.size();
  List<Object> values = new ArrayList<>(cardinality);
  for (Expression argument : arguments) {
    values.add(process(argument, context));
  }
  if (hasUnresolvedValue(values)) {
    return new Row(toExpressions(values, parameterTypes));
  }
  else {
    BlockBuilder blockBuilder = new RowBlockBuilder(parameterTypes, null, 1);
    BlockBuilder singleRowBlockWriter = blockBuilder.beginBlockEntry();
    for (int i = 0; i < cardinality; ++i) {
      writeNativeValue(parameterTypes.get(i), singleRowBlockWriter, values.get(i));
    }
    blockBuilder.closeEntry();
    return rowType.getObject(blockBuilder, 0);
  }
}
origin: prestodb/presto

new QuerySpecification(
    selectList(
        new DereferenceExpression(new Cast(new Row(Lists.newArrayList(new LongLiteral("11"), new LongLiteral("12"))), "ROW(COL0 INTEGER,COL1 INTEGER)"), identifier("col0"))),
    Optional.empty(),
    Optional.empty(),
origin: com.facebook.presto/presto-parser

public static Row row(Expression... values)
{
  return new Row(ImmutableList.copyOf(values));
}
origin: uk.co.nichesolutions.presto/presto-parser

public static Row row(Expression... values)
{
  return new Row(ImmutableList.copyOf(values));
}
origin: com.facebook.presto/presto-parser

@Override
public Node visitRowConstructor(SqlBaseParser.RowConstructorContext context)
{
  return new Row(getLocation(context), visit(context.expression(), Expression.class));
}
origin: uk.co.nichesolutions.presto/presto-parser

@Override
public Node visitRowConstructor(SqlBaseParser.RowConstructorContext context)
{
  return new Row(getLocation(context), visit(context.expression(), Expression.class));
}
origin: com.facebook.presto/presto-parser

new QuerySpecification(
    selectList(
        new DereferenceExpression(new Cast(new Row(Lists.newArrayList(new LongLiteral("11"), new LongLiteral("12"))), "ROW(COL0 INTEGER,COL1 INTEGER)"), identifier("col0"))),
    Optional.empty(),
    Optional.empty(),
com.facebook.presto.sql.treeRow<init>

Popular methods of Row

  • getItems

Popular in Java

  • Reading from database using SQL prepared statement
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getContentResolver (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JFrame (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now