Skip to content
Open
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
12bfb24
Fixed String() for Minute
zachmu Sep 3, 2026
b35a6d0
Fixed String() for YearWeek
zachmu Sep 3, 2026
bae6e36
Fixed String() for CountDistinct
zachmu Sep 3, 2026
cbfb35c
Fixed String() for FindInSet
zachmu Sep 3, 2026
07d0fcb
Restored FindInSet tests
zachmu Sep 3, 2026
e90f78c
Fixed String() for JsonLength
zachmu Sep 3, 2026
1e304ac
Fixed String() for JSONSearch
zachmu Sep 3, 2026
cac48d7
Fixed String() for NTile
zachmu Sep 3, 2026
afa72bb
Fixed String() for JSONObjectAgg
zachmu Sep 3, 2026
5783ba3
Fixed String() for BindVar
zachmu Sep 3, 2026
19a5e1f
Fixed String() for SystemVar
zachmu Sep 3, 2026
c727076
Fixed String() for Subquery
zachmu Sep 3, 2026
6fef4f1
Fixed String() for InSubquery
zachmu Sep 3, 2026
e7ccf7e
Fixed String() for HashInTuple
zachmu Sep 3, 2026
50d9900
Fixed String() for JsonValue
zachmu Sep 3, 2026
eefbf5f
Fixed String() for Atan
zachmu Sep 3, 2026
4a76e01
Added SQL String generation for aggregates
zachmu Sep 4, 2026
6cd68ab
Fixed String() for AnyValue
zachmu Sep 4, 2026
d707b3e
Fixed String() for Avg
zachmu Sep 4, 2026
3422f2a
Fixed String() for BitAnd
zachmu Sep 4, 2026
35e996a
Fixed String() for BitOr
zachmu Sep 4, 2026
e5a2dfc
Fixed String() for BitXor
zachmu Sep 4, 2026
e8a93de
Fixed String() for Count
zachmu Sep 4, 2026
d18b9a2
Added alternate window aggregate names
zachmu Sep 4, 2026
281069c
Fixed String() for First
zachmu Sep 4, 2026
8b7779a
Fixed String() for JsonArray
zachmu Sep 4, 2026
2fa5c0a
Fixed String() for Last
zachmu Sep 4, 2026
baa77df
Fixed String() for Max
zachmu Sep 4, 2026
2176efe
Fixed String() for Min
zachmu Sep 4, 2026
b7ac124
Fixed String() for Sum
zachmu Sep 4, 2026
1b02e9b
Fixed String() for StdDevPop
zachmu Sep 4, 2026
4e6eddc
Fixed String() for StdDevSamp
zachmu Sep 4, 2026
6bda797
Fixed String() for VarPop
zachmu Sep 4, 2026
7137326
Fixed String() for VarSamp
zachmu Sep 4, 2026
5442ec1
Fixed String() for GroupConcat
zachmu Sep 4, 2026
15cfb34
Fixed String() for AliasReference
zachmu Sep 4, 2026
372d220
Fixed String() for ColDefaultExpression
zachmu Sep 4, 2026
aa76dfa
Preserved scalar subquery alias behavior
zachmu Sep 4, 2026
95dc739
Fixed String() for Literal
zachmu Sep 4, 2026
5a423bf
Fixed String() for Char
zachmu Sep 4, 2026
db1094f
Fixed String() for Format
zachmu Sep 4, 2026
ba3377e
Fixed String() for LastInsertId
zachmu Sep 4, 2026
e2da031
Updated Literal plan strings
zachmu Sep 4, 2026
02bbfdb
Updated aggregate plan strings
zachmu Sep 4, 2026
c40cc35
Fixed String() for Wrapper
zachmu Sep 4, 2026
775f3fe
Fixed String() for Now
zachmu Sep 4, 2026
c0f3b36
Fixed String() for ColumnDefaultValue
zachmu Sep 4, 2026
4b91ced
Fixed String() for Literal
zachmu Sep 4, 2026
0afd484
Fixed String() for UnresolvedColumn
zachmu Sep 4, 2026
ee27049
Fixed String() for GetField
zachmu Sep 4, 2026
c362143
Fixed String() for Alias
zachmu Sep 4, 2026
10449d3
Fixed String() for AliasReference
zachmu Sep 4, 2026
92ee4f2
Fixed String() for Star
zachmu Sep 4, 2026
c440554
Fixed String() for ProcedureParam
zachmu Sep 4, 2026
399dc6c
Fixed String() for UnresolvedProcedureParam
zachmu Sep 4, 2026
729595b
Fixed String() for UserVar
zachmu Sep 4, 2026
855f510
Fixed String() for UnresolvedFunction
zachmu Sep 4, 2026
3e1e5fc
Fixed String() for AsWKT
zachmu Sep 4, 2026
ac61411
Fixed String() for GeomCollFromText
zachmu Sep 4, 2026
c4647a9
Fixed String() for GeomCollFromWKB
zachmu Sep 4, 2026
ba955b2
Fixed String() for MLineFromText
zachmu Sep 4, 2026
2099492
Fixed String() for UncompressedLength
zachmu Sep 4, 2026
f814df0
Fixed String() for ValidatePasswordStrength
zachmu Sep 4, 2026
aa7c6d4
Fixed String() for STEquals
zachmu Sep 4, 2026
c1a8e21
Restored GetField identity strings
zachmu Sep 4, 2026
7eccac1
Restored UnresolvedColumn identity strings
zachmu Sep 4, 2026
b70df41
Restored AliasReference identity strings
zachmu Sep 4, 2026
738b863
Updated Alias plan strings
zachmu Sep 4, 2026
9ad59b4
Updated generated expression plan strings
zachmu Sep 4, 2026
4794535
Merged latest main
zachmu Sep 4, 2026
49e7656
Updated merged window plan
zachmu Sep 4, 2026
071b6c3
Restored implicit column defaults
zachmu Sep 4, 2026
7b35bdd
Fixed UserVar prepared bindings
zachmu Sep 4, 2026
457fd50
Fixed grouped window aggregates
zachmu Sep 4, 2026
006422b
Scoped grouped window test to MySQL
zachmu Sep 4, 2026
110dc09
Fixed grouped multiple window expressions
zachmu Sep 4, 2026
1366d0d
Propagated expression describe options
zachmu Sep 4, 2026
6e61c15
Fixed HAVING with grouped windows
zachmu Sep 4, 2026
b7d031c
Fixed String() for HashInTuple
zachmu Sep 4, 2026
b45b558
Added Describe for unary aggregates
zachmu Sep 4, 2026
7feb664
Preserved window descriptions in projected fields
zachmu Sep 4, 2026
3ff64aa
Strengthened expression String round-trip tests
zachmu Sep 4, 2026
ea15baa
Merge remote-tracking branch 'origin/main' into zachmu/audit-expressi…
zachmu Sep 4, 2026
36ac339
[ga-format-pr] Run ./format_repo.sh to fix formatting
zachmu Sep 4, 2026
f0122cb
Compared parsed expression AST values
zachmu Sep 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,9 @@ func (e *Engine) bindExecuteQueryNode(ctx *sql.Context, query string, eq *plan.E

// TODO: overwrite the current binding if bindings are not empty???
tempBindings := make(map[string]sql.Expression)
for i, name := range eq.BindVars {
if strings.HasPrefix(name.String(), "@") {
t, val, err := ctx.GetUserVariable(ctx, strings.TrimPrefix(name.String(), "@"))
for i, binding := range eq.BindVars {
if userVar, ok := binding.(*expression.UserVar); ok {
t, val, err := ctx.GetUserVariable(ctx, userVar.Name)
if err != nil {
return nil, nil
}
Expand All @@ -596,7 +596,7 @@ func (e *Engine) bindExecuteQueryNode(ctx *sql.Context, query string, eq *plan.E
}
tempBindings[fmt.Sprintf("v%d", i+1)] = expression.NewLiteral(val, t)
} else {
tempBindings[fmt.Sprintf("v%d", i)] = name
tempBindings[fmt.Sprintf("v%d", i)] = binding
}
}

Expand Down
384 changes: 192 additions & 192 deletions enginetest/queries/imdb_plans.go

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions enginetest/queries/index_query_plans.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

726 changes: 74 additions & 652 deletions enginetest/queries/integration_plans.go

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions enginetest/queries/prepared_statement_queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ var PreparedScriptTests = []ScriptTest{
"set @a = 1",
"set @b = 100",
"set @c = 'abc'",
"set @schema = 'reserved name'",
},
Assertions: []ScriptTestAssertion{
{
Expand Down Expand Up @@ -134,6 +135,12 @@ var PreparedScriptTests = []ScriptTest{
{"abc"},
},
},
{
Query: "execute s using @schema",
Expected: []sql.Row{
{"reserved name"},
},
},
{
Query: "deallocate prepare s",
Expected: []sql.Row{
Expand Down
2 changes: 1 addition & 1 deletion enginetest/queries/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -9366,7 +9366,7 @@ from typestable`,
{"Project"},
{" ├─ columns: [count(1)]"},
{" └─ Project"},
{" ├─ columns: [mytable.COUNT(1) as COUNT(1)]"},
{" ├─ columns: [mytable.COUNT(1) as `COUNT(1)`]"},
{" └─ table_count(mytable) as COUNT(1)"},
},
},
Expand Down
Loading
Loading