sqlparser/dialect/
hive.rs1use crate::dialect::Dialect;
19
20#[derive(#[automatically_derived]
impl ::core::fmt::Debug for HiveDialect {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "HiveDialect")
}
}Debug, #[automatically_derived]
impl ::core::default::Default for HiveDialect {
#[inline]
fn default() -> HiveDialect { HiveDialect {} }
}Default, #[automatically_derived]
impl ::core::clone::Clone for HiveDialect {
#[inline]
fn clone(&self) -> HiveDialect { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for HiveDialect { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for HiveDialect {
#[inline]
fn eq(&self, other: &HiveDialect) -> bool { true }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for HiveDialect {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::hash::Hash for HiveDialect {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {}
}Hash, #[automatically_derived]
impl ::core::cmp::PartialOrd for HiveDialect {
#[inline]
fn partial_cmp(&self, other: &HiveDialect)
-> ::core::option::Option<::core::cmp::Ordering> {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Ord for HiveDialect {
#[inline]
fn cmp(&self, other: &HiveDialect) -> ::core::cmp::Ordering {
::core::cmp::Ordering::Equal
}
}Ord)]
22#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
23pub struct HiveDialect {}
24
25impl Dialect for HiveDialect {
26 fn is_delimited_identifier_start(&self, ch: char) -> bool {
27 (ch == '"') || (ch == '`')
28 }
29
30 fn is_identifier_start(&self, ch: char) -> bool {
31 ch.is_ascii_lowercase() || ch.is_ascii_uppercase() || ch.is_ascii_digit() || ch == '$'
32 }
33
34 fn is_identifier_part(&self, ch: char) -> bool {
35 ch.is_ascii_lowercase()
36 || ch.is_ascii_uppercase()
37 || ch.is_ascii_digit()
38 || ch == '_'
39 || ch == '$'
40 || ch == '{'
41 || ch == '}'
42 }
43
44 fn supports_filter_during_aggregation(&self) -> bool {
45 true
46 }
47
48 fn supports_numeric_prefix(&self) -> bool {
49 true
50 }
51
52 fn require_interval_qualifier(&self) -> bool {
53 true
54 }
55
56 fn supports_bang_not_operator(&self) -> bool {
58 true
59 }
60
61 fn supports_load_data(&self) -> bool {
63 true
64 }
65
66 fn supports_table_sample_before_alias(&self) -> bool {
68 true
69 }
70
71 fn supports_group_by_with_modifier(&self) -> bool {
73 true
74 }
75}