From 762a35203c3049c380b35c7a6e04ac5502f56a9e Mon Sep 17 00:00:00 2001
From: Andrey Strochuk <a.strochuk@picodata.io>
Date: Tue, 9 Apr 2024 19:34:02 +0300
Subject: [PATCH] Change AUTHORS file

---
 AUTHORS                                             | 3 ++-
 sbroad-cartridge/src/api/calculate_bucket_id.rs     | 8 ++------
 sbroad-core/src/frontend/sql.rs                     | 6 +++---
 sbroad-core/src/ir/ddl.rs                           | 8 ++++----
 sbroad-core/src/ir/transformation/redistribution.rs | 2 +-
 5 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 74554cbbd..d46170317 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,14 +2,15 @@ Below follows a list of people, who contributed their code and efforts.
 
 Alexander Tolstoy
 Anastasia Lomakina
+Andrey Strochuk
 Arseniy Volynets
 Denis Smirnov
 Dmitriy Koltsov
 Dmitriy Travyan
 Emir Vildanov
+Fedor Telnov
 Igor Kuznetsov
 Roman Khait
-Fedor Telnov
 
 NOTE: If you can commit a change to this list, please do not hesitate
 to add your name to it.
diff --git a/sbroad-cartridge/src/api/calculate_bucket_id.rs b/sbroad-cartridge/src/api/calculate_bucket_id.rs
index 5a1dacedd..c7166a606 100644
--- a/sbroad-cartridge/src/api/calculate_bucket_id.rs
+++ b/sbroad-cartridge/src/api/calculate_bucket_id.rs
@@ -1,9 +1,9 @@
 use std::collections::HashMap;
 
 use sbroad::errors::{Entity, SbroadError};
-use tarantool::tuple::{RawBytes, Tuple};
-use smol_str::{format_smolstr, SmolStr};
 use serde::{de::Deserializer, Deserialize, Serialize};
+use smol_str::{format_smolstr, SmolStr};
+use tarantool::tuple::{RawBytes, Tuple};
 
 use crate::api::helper::load_config;
 use crate::api::COORDINATOR_ENGINE;
@@ -106,11 +106,7 @@ impl TryFrom<&Tuple> for Args {
             format_smolstr!(
                 "expected string, tuple with a space name, or map with a space name as an argument, \
                 got args {:?}",
-<<<<<<< HEAD
                 &tuple
-=======
-                &value
->>>>>>> eac5d15 (Change String to SmolStr in SbroadError)
             ),
         ))
     }
diff --git a/sbroad-core/src/frontend/sql.rs b/sbroad-core/src/frontend/sql.rs
index 4e10e6498..e02a46401 100644
--- a/sbroad-core/src/frontend/sql.rs
+++ b/sbroad-core/src/frontend/sql.rs
@@ -332,8 +332,8 @@ fn parse_drop_proc(ast: &AbstractSyntaxTree, node: &ParseNode) -> Result<Ddl, Sb
 #[allow(clippy::too_many_lines)]
 fn parse_create_index(ast: &AbstractSyntaxTree, node: &ParseNode) -> Result<Ddl, SbroadError> {
     assert_eq!(node.rule, Rule::CreateIndex);
-    let mut name = String::new();
-    let mut table_name = String::new();
+    let mut name = SmolStr::default();
+    let mut table_name = SmolStr::default();
     let mut columns = Vec::new();
     let mut unique = false;
     let mut index_type = IndexType::Tree;
@@ -467,7 +467,7 @@ fn parse_create_index(ast: &AbstractSyntaxTree, node: &ParseNode) -> Result<Ddl,
 
 fn parse_drop_index(ast: &AbstractSyntaxTree, node: &ParseNode) -> Result<Ddl, SbroadError> {
     assert_eq!(node.rule, Rule::DropIndex);
-    let mut name = String::new();
+    let mut name = SmolStr::default();
     let mut timeout = get_default_timeout();
     for child_id in &node.children {
         let child_node = ast.nodes.get_node(*child_id)?;
diff --git a/sbroad-core/src/ir/ddl.rs b/sbroad-core/src/ir/ddl.rs
index 350c6d1f6..05fdda993 100644
--- a/sbroad-core/src/ir/ddl.rs
+++ b/sbroad-core/src/ir/ddl.rs
@@ -73,9 +73,9 @@ pub enum Ddl {
         timeout: Decimal,
     },
     CreateIndex {
-        name: String,
-        table_name: String,
-        columns: Vec<String>,
+        name: SmolStr,
+        table_name: SmolStr,
+        columns: Vec<SmolStr>,
         unique: bool,
         index_type: IndexType,
         bloom_fpr: Option<Decimal>,
@@ -89,7 +89,7 @@ pub enum Ddl {
         timeout: Decimal,
     },
     DropIndex {
-        name: String,
+        name: SmolStr,
         timeout: Decimal,
     },
 }
diff --git a/sbroad-core/src/ir/transformation/redistribution.rs b/sbroad-core/src/ir/transformation/redistribution.rs
index cbaa2647a..f65c829b6 100644
--- a/sbroad-core/src/ir/transformation/redistribution.rs
+++ b/sbroad-core/src/ir/transformation/redistribution.rs
@@ -578,7 +578,7 @@ impl Plan {
 
         // Check that all children we need to add motions exist in the current relational node.
         let children_set: HashSet<usize> = children.iter().copied().collect();
-        if let false = strategy
+        if !strategy
             .children_policy
             .iter()
             .all(|(node, _)| children_set.get(node).is_some())
-- 
GitLab