Tabnine Logo
ExplainFormat.<init>
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: prestodb/presto

@Override
public Node visitExplainFormat(SqlBaseParser.ExplainFormatContext context)
{
  switch (context.value.getType()) {
    case SqlBaseLexer.GRAPHVIZ:
      return new ExplainFormat(getLocation(context), ExplainFormat.Type.GRAPHVIZ);
    case SqlBaseLexer.TEXT:
      return new ExplainFormat(getLocation(context), ExplainFormat.Type.TEXT);
    case SqlBaseLexer.JSON:
      return new ExplainFormat(getLocation(context), ExplainFormat.Type.JSON);
  }
  throw new IllegalArgumentException("Unsupported EXPLAIN format: " + context.value.getText());
}
origin: prestodb/presto

@Test
public void testExplain()
{
  assertStatement("EXPLAIN SELECT * FROM t",
      new Explain(simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("t"))), false, false, ImmutableList.of()));
  assertStatement("EXPLAIN (TYPE LOGICAL) SELECT * FROM t",
      new Explain(
          simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("t"))),
          false,
          false,
          ImmutableList.of(new ExplainType(ExplainType.Type.LOGICAL))));
  assertStatement("EXPLAIN (TYPE LOGICAL, FORMAT TEXT) SELECT * FROM t",
      new Explain(
          simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("t"))),
          false,
          false,
          ImmutableList.of(
              new ExplainType(ExplainType.Type.LOGICAL),
              new ExplainFormat(ExplainFormat.Type.TEXT))));
}
origin: com.facebook.presto/presto-parser

@Override
public Node visitExplainFormat(SqlBaseParser.ExplainFormatContext context)
{
  switch (context.value.getType()) {
    case SqlBaseLexer.GRAPHVIZ:
      return new ExplainFormat(getLocation(context), ExplainFormat.Type.GRAPHVIZ);
    case SqlBaseLexer.TEXT:
      return new ExplainFormat(getLocation(context), ExplainFormat.Type.TEXT);
    case SqlBaseLexer.JSON:
      return new ExplainFormat(getLocation(context), ExplainFormat.Type.JSON);
  }
  throw new IllegalArgumentException("Unsupported EXPLAIN format: " + context.value.getText());
}
origin: uk.co.nichesolutions.presto/presto-parser

@Override
public Node visitExplainFormat(SqlBaseParser.ExplainFormatContext context)
{
  switch (context.value.getType()) {
    case SqlBaseLexer.GRAPHVIZ:
      return new ExplainFormat(getLocation(context), ExplainFormat.Type.GRAPHVIZ);
    case SqlBaseLexer.TEXT:
      return new ExplainFormat(getLocation(context), ExplainFormat.Type.TEXT);
  }
  throw new IllegalArgumentException("Unsupported EXPLAIN format: " + context.value.getText());
}
origin: uk.co.nichesolutions.presto/presto-parser

@Test
public void testExplain()
    throws Exception
{
  assertStatement("EXPLAIN SELECT * FROM t",
      new Explain(simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("t"))), false, ImmutableList.of()));
  assertStatement("EXPLAIN (TYPE LOGICAL) SELECT * FROM t",
      new Explain(
          simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("t"))),
          false,
          ImmutableList.of(new ExplainType(ExplainType.Type.LOGICAL))));
  assertStatement("EXPLAIN (TYPE LOGICAL, FORMAT TEXT) SELECT * FROM t",
      new Explain(
          simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("t"))),
          false,
          ImmutableList.of(
              new ExplainType(ExplainType.Type.LOGICAL),
              new ExplainFormat(ExplainFormat.Type.TEXT))));
}
origin: com.facebook.presto/presto-parser

@Test
public void testExplain()
{
  assertStatement("EXPLAIN SELECT * FROM t",
      new Explain(simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("t"))), false, false, ImmutableList.of()));
  assertStatement("EXPLAIN (TYPE LOGICAL) SELECT * FROM t",
      new Explain(
          simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("t"))),
          false,
          false,
          ImmutableList.of(new ExplainType(ExplainType.Type.LOGICAL))));
  assertStatement("EXPLAIN (TYPE LOGICAL, FORMAT TEXT) SELECT * FROM t",
      new Explain(
          simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("t"))),
          false,
          false,
          ImmutableList.of(
              new ExplainType(ExplainType.Type.LOGICAL),
              new ExplainFormat(ExplainFormat.Type.TEXT))));
}
com.facebook.presto.sql.treeExplainFormat<init>

Popular methods of ExplainFormat

  • getType

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Kernel (java.awt.image)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • CodeWhisperer 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