• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gluesql / gluesql / 17021222400

17 Aug 2025 12:49PM UTC coverage: 97.834% (-0.2%) from 98.008%
17021222400

push

github

web-flow
Bump Rust toolchain to 1.88 (#1747)

Update format! macros to use direct variable interpolation instead of
positional arguments for improved readability and Rust 1.88 compliance.

- Fixed clippy warnings across core, cli, storages, and test packages
- Changed format!("{}", var) to format!("{var}") pattern
- Applied fixes consistently throughout the entire workspace
- Updated rust-toolchain.toml to use Rust 1.88

Signed-off-by: john <meenseek5929@naver.com>

92 of 122 new or added lines in 48 files covered. (75.41%)

60 existing lines in 20 files now uncovered.

37086 of 37907 relevant lines covered (97.83%)

127441.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/core/src/executor/evaluate/error.rs
1
use {
2
    crate::ast::{Aggregate, BinaryOperator, Expr, ToSql},
3
    serde::{Serialize, Serializer},
4
    std::fmt::Debug,
5
    thiserror::Error,
6
};
7

8
#[derive(Error, Serialize, Debug, PartialEq, Eq)]
9
pub enum EvaluateError {
10
    #[error(transparent)]
11
    #[serde(serialize_with = "error_serialize")]
12
    FormatParseError(#[from] chrono::format::ParseError),
13

14
    #[error("literal add on non-numeric")]
15
    LiteralAddOnNonNumeric,
16

17
    #[error("function requires string value: {0}")]
18
    FunctionRequiresStringValue(String),
19

20
    #[error("function requires integer or string value: {0}")]
21
    FunctionRequiresIntegerOrStringValue(String),
22

23
    #[error("function requires integer value: {0}")]
24
    FunctionRequiresIntegerValue(String),
25

26
    #[error("function requires float or integer value: {0}")]
27
    FunctionRequiresFloatOrIntegerValue(String),
28

29
    #[error("function requires usize value: {0}")]
30
    FunctionRequiresUSizeValue(String),
31

32
    #[error("function requires float value: {0}")]
33
    FunctionRequiresFloatValue(String),
34

35
    #[error("extract format does not support value: {0}")]
36
    ExtractFormatNotMatched(String),
37

38
    #[error("function requires map value: {0}")]
39
    FunctionRequiresMapValue(String),
40

41
    #[error("function requires point value: {0}")]
42
    FunctionRequiresPointValue(String),
43

44
    #[error("function requires date or datetime value: {0}")]
45
    FunctionRequiresDateOrDateTimeValue(String),
46

47
    #[error("function requires one of string, list, map types: {0}")]
48
    FunctionRequiresStrOrListOrMapValue(String),
49

50
    #[error("identifier not found: {0}")]
51
    IdentifierNotFound(String),
52

53
    #[error("identifier not found: {table_alias}.{column_name}")]
54
    CompoundIdentifierNotFound {
55
        table_alias: String,
56
        column_name: String,
57
    },
58

59
    #[error("only boolean value is accepted: {0}")]
60
    BooleanTypeRequired(String),
61

62
    #[error("expr requires map or list value")]
63
    MapOrListTypeRequired,
64

65
    #[error("expr requires map value")]
66
    MapTypeRequired,
67

68
    #[error("expr requires list value")]
69
    ListTypeRequired,
70

71
    #[error("all elements in the list must be comparable to each other")]
72
    InvalidSortType,
73

74
    #[error("sort order must be either ASC or DESC")]
75
    InvalidSortOrder,
76

77
    #[error("map or string value required for json map conversion: {0}")]
78
    MapOrStringValueRequired(String),
79

80
    #[error("text literal required for json map conversion: {0}")]
81
    TextLiteralRequired(String),
82

83
    #[error("unsupported stateless expression: {}", .0.to_sql())]
84
    UnsupportedStatelessExpr(Expr),
85

86
    #[error("context is required for identifier evaluation: {}", .0.to_sql())]
87
    ContextRequiredForIdentEvaluation(Expr),
88

89
    #[error("unreachable empty aggregate value: {0:?}")]
90
    UnreachableEmptyAggregateValue(Aggregate),
91

92
    #[error("filter context is required for aggregate function: {0:?}")]
93
    FilterContextRequiredForAggregate(Aggregate),
94

95
    #[error("incompatible bit operation between {0} and {1}")]
96
    IncompatibleBitOperation(String, String),
97

98
    #[error("the divisor should not be zero")]
99
    DivisorShouldNotBeZero,
100

101
    #[error("negative substring length not allowed")]
102
    NegativeSubstrLenNotAllowed,
103

104
    #[error("subquery returns more than one row")]
105
    MoreThanOneRowReturned,
106

107
    #[error("subquery returns more than one column")]
108
    MoreThanOneColumnReturned,
109

110
    #[error("schemaless projection is not allowed for IN (subquery)")]
111
    SchemalessProjectionForInSubQuery,
112

113
    #[error("schemaless projection is not allowed for subquery")]
114
    SchemalessProjectionForSubQuery,
115

116
    #[error("format function does not support following data_type: {0}")]
117
    UnsupportedExprForFormatFunction(String),
118

119
    #[error("support single character only")]
120
    AsciiFunctionRequiresSingleCharacterValue,
121

122
    #[error("non-ascii character not allowed")]
123
    NonAsciiCharacterNotAllowed,
124

125
    #[error("function requires integer value in range")]
126
    ChrFunctionRequiresIntegerValueInRange0To255,
127

128
    #[error("unsupported evaluate binary operation {} {} {}", .left, .op.to_sql(), .right)]
129
    UnsupportedBinaryOperation {
130
        left: String,
131
        op: BinaryOperator,
132
        right: String,
133
    },
134

135
    #[error("unsupported evaluate string unary plus: {0}")]
136
    UnsupportedUnaryPlus(String),
137

138
    #[error("unsupported evaluate string unary minus: {0}")]
139
    UnsupportedUnaryMinus(String),
140

141
    #[error("unsupported evaluate string unary factorial: {0}")]
142
    UnsupportedUnaryFactorial(String),
143

144
    #[error("incompatible bit operation ~{0}")]
145
    IncompatibleUnaryBitwiseNotOperation(String),
146

147
    #[error("unsupported custom function in subqueries")]
148
    UnsupportedCustomFunction,
149

150
    #[error(r#"The function "{function_name}" requires at least {required_minimum} argument(s), but {found} were provided."#)]
151
    FunctionRequiresMoreArguments {
152
        function_name: String,
153
        required_minimum: usize,
154
        found: usize,
155
    },
156

157
    #[error(
158
        "function args.length not matching: {name}, expected: {expected_minimum} ~ {expected_maximum}, found: {found}"
159
    )]
160
    FunctionArgsLengthNotWithinRange {
161
        name: String,
162
        expected_minimum: usize,
163
        expected_maximum: usize,
164
        found: usize,
165
    },
166

167
    #[error("unsupported function: {0}")]
168
    UnsupportedFunction(String),
169

170
    #[error("The provided arguments are non-comparable: {0}")]
171
    NonComparableArgumentError(String),
172

173
    #[error("function requires at least one argument: {0}")]
174
    FunctionRequiresAtLeastOneArgument(String),
175

176
    #[error("function CONCAT requires at least 1 argument")]
177
    EmptyArgNotAllowedInConcat,
178

179
    #[error("LCM calculation resulted in a value out of the i64 range")]
180
    LcmResultOutOfRange,
181

182
    #[error("GCD or LCM calculation overflowed on trying to get the absolute value of {0}")]
183
    GcdLcmOverflow(i64),
184

185
    #[error("failed to convert Value to u32: {0}")]
186
    I64ToU32ConversionFailure(String),
187
}
188

189
fn error_serialize<S>(error: &chrono::format::ParseError, serializer: S) -> Result<S::Ok, S::Error>
×
190
where
×
191
    S: Serializer,
×
192
{
NEW
193
    let display = format!("{error}");
×
194
    serializer.serialize_str(&display)
×
195
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc