This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new 44c40238 Added missing `Copy` derives (#2158)
44c40238 is described below

commit 44c402385e15e0d96c68d151dcb8019fe31687f8
Author: Luca Cappelletti <[email protected]>
AuthorDate: Sat Jan 10 11:29:29 2026 +0100

    Added missing `Copy` derives (#2158)
---
 src/ast/comments.rs  |  6 +++---
 src/ast/data_type.rs |  2 +-
 src/ast/ddl.rs       | 14 +++++++-------
 src/ast/dml.rs       |  2 +-
 src/ast/mod.rs       |  2 +-
 src/ast/query.rs     | 18 +++++++++---------
 src/ast/value.rs     |  2 +-
 7 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/ast/comments.rs b/src/ast/comments.rs
index b398474b..7744c89e 100644
--- a/src/ast/comments.rs
+++ b/src/ast/comments.rs
@@ -25,7 +25,7 @@ use core::{
 use crate::tokenizer::{Location, Span};
 
 /// An opaque container for comments from a parse SQL source code.
-#[derive(Default, Debug)]
+#[derive(Default, Debug, Clone)]
 pub struct Comments(Vec<CommentWithSpan>);
 
 impl Comments {
@@ -151,7 +151,7 @@ impl From<Comments> for Vec<CommentWithSpan> {
 }
 
 /// A source code comment with information of its entire span.
-#[derive(Debug, Clone, PartialEq, Eq)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct CommentWithSpan {
     /// The source code comment iself
     pub comment: Comment,
@@ -168,7 +168,7 @@ impl Deref for CommentWithSpan {
 }
 
 /// A unified type of the different source code comment formats.
-#[derive(Debug, Clone, PartialEq, Eq)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum Comment {
     /// A single line comment, typically introduced with a prefix and spanning
     /// until end-of-line or end-of-file in the source code.
diff --git a/src/ast/data_type.rs b/src/ast/data_type.rs
index 535a5232..285eec50 100644
--- a/src/ast/data_type.rs
+++ b/src/ast/data_type.rs
@@ -894,7 +894,7 @@ fn format_clickhouse_datetime_precision_and_timezone(
 }
 
 /// Type of brackets used for `STRUCT` literals.
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 pub enum StructBracketKind {
diff --git a/src/ast/ddl.rs b/src/ast/ddl.rs
index 6c831442..23fcc010 100644
--- a/src/ast/ddl.rs
+++ b/src/ast/ddl.rs
@@ -570,7 +570,7 @@ impl fmt::Display for AlterPolicyOperation {
 /// [MySQL] `ALTER TABLE` algorithm.
 ///
 /// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// Algorithm option for `ALTER TABLE` operations (MySQL-specific).
@@ -599,7 +599,7 @@ impl fmt::Display for AlterTableAlgorithm {
 /// [MySQL] `ALTER TABLE` lock.
 ///
 /// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// Locking behavior for `ALTER TABLE` (MySQL-specific).
@@ -1445,7 +1445,7 @@ impl fmt::Display for IndexOption {
 /// [PostgreSQL] unique index nulls handling option: `[ NULLS [ NOT ] DISTINCT 
]`
 ///
 /// [PostgreSQL]: https://www.postgresql.org/docs/17/sql-altertable.html
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 pub enum NullsDistinctOption {
@@ -1756,7 +1756,7 @@ pub struct IdentityParameters {
 /// ORDER | NOORDER
 /// ```
 /// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 pub enum IdentityPropertyOrder {
@@ -2128,7 +2128,7 @@ impl fmt::Display for ColumnOption {
 
 /// `GeneratedAs`s are modifiers that follow a column option in a `generated`.
 /// 'ExpStored' is used for a column generated from an expression and stored.
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 pub enum GeneratedAs {
@@ -2142,7 +2142,7 @@ pub enum GeneratedAs {
 
 /// `GeneratedExpressionMode`s are modifiers that follow an expression in a 
`generated`.
 /// No modifier is typically the same as Virtual.
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 pub enum GeneratedExpressionMode {
@@ -3799,7 +3799,7 @@ impl Spanned for RenameTableNameKind {
     }
 }
 
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// Whether the syntax used for the trigger object (ROW or STATEMENT) is `FOR` 
or `FOR EACH`.
diff --git a/src/ast/dml.rs b/src/ast/dml.rs
index 150a5489..32c023e0 100644
--- a/src/ast/dml.rs
+++ b/src/ast/dml.rs
@@ -401,7 +401,7 @@ impl Display for MergeClause {
 /// ```
 /// [Snowflake](https://docs.snowflake.com/en/sql-reference/sql/merge)
 /// 
[BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#merge_statement)
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 pub enum MergeClauseKind {
diff --git a/src/ast/mod.rs b/src/ast/mod.rs
index 9115bb29..7e0f1a10 100644
--- a/src/ast/mod.rs
+++ b/src/ast/mod.rs
@@ -8526,7 +8526,7 @@ impl fmt::Display for TableOptionsClustered {
 }
 
 /// Specifies which partition the boundary values on table partitioning 
belongs to.
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 pub enum PartitionRangeDirection {
diff --git a/src/ast/query.rs b/src/ast/query.rs
index 86f3d13b..d8af243f 100644
--- a/src/ast/query.rs
+++ b/src/ast/query.rs
@@ -322,7 +322,7 @@ impl fmt::Display for Table {
 }
 
 /// What did this select look like?
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 pub enum SelectFlavor {
@@ -649,7 +649,7 @@ impl fmt::Display for With {
     }
 }
 
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// Indicates whether a CTE is materialized or not.
@@ -1185,7 +1185,7 @@ pub struct TableFunctionArgs {
     pub settings: Option<Vec<Setting>>,
 }
 
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// Type of index hint (e.g., `USE`, `IGNORE`, `FORCE`).
@@ -1208,7 +1208,7 @@ impl fmt::Display for TableIndexHintType {
     }
 }
 
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// The kind of index referenced by an index hint (e.g. `USE INDEX`).
@@ -1228,7 +1228,7 @@ impl fmt::Display for TableIndexType {
     }
 }
 
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// Which clause the table index hint applies to.
@@ -1579,7 +1579,7 @@ pub struct TableSample {
     pub offset: Option<Expr>,
 }
 
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// Modifier specifying whether `SAMPLE` or `TABLESAMPLE` keyword was used.
@@ -1630,7 +1630,7 @@ impl fmt::Display for TableSampleQuantity {
 }
 
 /// The table sample method names
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// Sampling method used by `TABLESAMPLE`.
@@ -1674,7 +1674,7 @@ impl fmt::Display for TableSampleSeed {
     }
 }
 
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// Modifier specifying how the sample seed is applied.
@@ -1694,7 +1694,7 @@ impl fmt::Display for TableSampleSeedModifier {
     }
 }
 
-#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// Unit used with a `TABLESAMPLE` quantity (rows or percent).
diff --git a/src/ast/value.rs b/src/ast/value.rs
index dc46a5bb..8879a252 100644
--- a/src/ast/value.rs
+++ b/src/ast/value.rs
@@ -484,7 +484,7 @@ impl fmt::Display for DateTimeField {
     }
 }
 
-#[derive(Debug, Clone, PartialEq, Eq, Ord, PartialOrd, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Ord, PartialOrd, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
 /// The Unicode Standard defines four normalization forms, which are intended 
to eliminate


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to