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

gluesql / gluesql / 20000719104
98%

Build:
DEFAULT BRANCH: main
Ran 07 Dec 2025 07:24AM UTC
Jobs 1
Files 323
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Dec 2025 07:12AM UTC coverage: 98.107% (+0.1%) from 98.003%
20000719104

push

github

web-flow
Eliminate Literal type by absorbing into Evaluated (#1845)

This PR eliminates the data::Literal type entirely by absorbing its functionality into the existing Evaluated enum in the evaluator layer.

**Background**
The codebase had three overlapping types for representing values during query execution:

* AstLiteral – parsed literal from SQL input
* Literal – intermediate representation for literal operations
* Value – final evaluated result
The Literal type was supposed to handle literal-specific operations (arithmetic, comparison, concatenation, etc.) before converting to Value. However, the Evaluated enum already existed in the evaluator and could handle these cases directly, making Literal an unnecessary intermediate layer.

**What Changed**
- Removed:
data::Literal enum (Boolean, Number, Text, Bytea, Null variants)
data::LiteralError
data::value::ConvertError

- Replaced with:
// Before: Evaluated wrapped Literal
pub enum Evaluated<'a> {
    Literal(Literal<'a>),
    StrSlice { ... },
    Value(Value),
}

// After: Evaluated handles literals directly
pub enum Evaluated<'a> {
    Number(Cow<'a, BigDecimal>),  // numeric literals
    Text(Cow<'a, str>),           // string literals
    StrSlice { ... },
    Value(Value),                  // bool, bytea, null → directly to Value
}

- Error consolidation:

LiteralError → merged into EvaluateError
ConvertError → merged into ValueError::ConvertFailed
New modules under executor/evaluate/evaluated/:

binary_op.rs, unary_op.rs – arithmetic operations
cmp.rs, eq.rs – comparisons
concat.rs, like.rs – string operations
convert/number.rs, convert/text.rs – type conversions

1628 of 1628 new or added lines in 17 files covered. (100.0%)

6 existing lines in 2 files now uncovered.

39692 of 40458 relevant lines covered (98.11%)

64601.45 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
99.57
-0.04% core/src/data/value.rs
5
97.73
-0.59% core/src/executor/evaluate/function.rs
Jobs
ID Job ID Ran Files Coverage
1 20000719104.1 07 Dec 2025 07:24AM UTC 323
98.11
GitHub Action Run
Source Files on build 20000719104
  • Tree
  • List 323
  • Changed 21
  • Source Changed 0
  • Coverage Changed 21
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f0978381 on github
  • Prev Build on main (#20000220364)
  • Next Build on main (#20001125198)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc