public static ColumnName parse(final String text) {
    final SqlBaseLexer lexer = new SqlBaseLexer(
        new CaseInsensitiveStream(CharStreams.fromString(text))
    );
    final CommonTokenStream tokStream = new CommonTokenStream(lexer);
    final SqlBaseParser parser = new SqlBaseParser(tokStream);

    final PrimaryExpressionContext primaryExpression = parser.primaryExpression();
    if (primaryExpression instanceof ColumnReferenceContext) {
      return resolve((ColumnReferenceContext) primaryExpression).getColumnName();
    }
    if (primaryExpression instanceof QualifiedColumnReferenceContext) {
      return resolve((QualifiedColumnReferenceContext) primaryExpression).getColumnName();
    }

    throw new ParseFailedException(
        "Cannot parse text that is not column reference.",
        "Cannot parse text that is not column reference: " + text,
        text
    );
  }
@Test
  public void shouldParseQuotedIdentifier() {
    // When:
    final ColumnName result = ColumnReferenceParser.parse("`foo`");

    // Then:
    assertThat(result, is(ColumnName.of("foo")));
  }