mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
PostgreSQL: Support schema-qualified operator classes in CREATE INDEX (#2131)
Some checks are pending
license / Release Audit Tool (RAT) (push) Waiting to run
Rust / codestyle (push) Waiting to run
Rust / lint (push) Waiting to run
Rust / benchmark-lint (push) Waiting to run
Rust / compile (push) Waiting to run
Rust / docs (push) Waiting to run
Rust / compile-no-std (push) Waiting to run
Rust / test (beta) (push) Waiting to run
Rust / test (nightly) (push) Waiting to run
Rust / test (stable) (push) Waiting to run
Some checks are pending
license / Release Audit Tool (RAT) (push) Waiting to run
Rust / codestyle (push) Waiting to run
Rust / lint (push) Waiting to run
Rust / benchmark-lint (push) Waiting to run
Rust / compile (push) Waiting to run
Rust / docs (push) Waiting to run
Rust / compile-no-std (push) Waiting to run
Rust / test (beta) (push) Waiting to run
Rust / test (nightly) (push) Waiting to run
Rust / test (stable) (push) Waiting to run
This commit is contained in:
parent
9b8a2d1e22
commit
cdeed32294
3 changed files with 44 additions and 8 deletions
|
|
@ -61,7 +61,7 @@ use crate::tokenizer::{Span, Token};
|
|||
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
|
||||
pub struct IndexColumn {
|
||||
pub column: OrderByExpr,
|
||||
pub operator_class: Option<Ident>,
|
||||
pub operator_class: Option<ObjectName>,
|
||||
}
|
||||
|
||||
impl From<Ident> for IndexColumn {
|
||||
|
|
|
|||
|
|
@ -16933,10 +16933,10 @@ impl<'a> Parser<'a> {
|
|||
fn parse_order_by_expr_inner(
|
||||
&mut self,
|
||||
with_operator_class: bool,
|
||||
) -> Result<(OrderByExpr, Option<Ident>), ParserError> {
|
||||
) -> Result<(OrderByExpr, Option<ObjectName>), ParserError> {
|
||||
let expr = self.parse_expr()?;
|
||||
|
||||
let operator_class: Option<Ident> = if with_operator_class {
|
||||
let operator_class: Option<ObjectName> = if with_operator_class {
|
||||
// We check that if non of the following keywords are present, then we parse an
|
||||
// identifier as operator class.
|
||||
if self
|
||||
|
|
@ -16945,7 +16945,7 @@ impl<'a> Parser<'a> {
|
|||
{
|
||||
None
|
||||
} else {
|
||||
self.maybe_parse(|parser| parser.parse_identifier())?
|
||||
self.maybe_parse(|parser| parser.parse_object_name(false))?
|
||||
}
|
||||
} else {
|
||||
None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue