Sql Expressions: (Chore) Dedicated logger for expr.sql, and pass context (#109549)

This commit is contained in:
Kyle Brandt
2025-08-13 11:20:14 -04:00
committed by GitHub
parent 789a61230d
commit 466aa70179
17 changed files with 56 additions and 50 deletions
+3 -3
View File
@@ -18,7 +18,7 @@ import (
)
func TestNewCommand(t *testing.T) {
cmd, err := NewSQLCommand("a", "", "select a from foo, bar", 0, 0, 0)
cmd, err := NewSQLCommand(t.Context(), "a", "", "select a from foo, bar", 0, 0, 0)
if err != nil && strings.Contains(err.Error(), "feature is not enabled") {
return
}
@@ -126,7 +126,7 @@ func TestSQLCommandCellLimits(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cmd, err := NewSQLCommand("a", "", "select a from foo, bar", tt.limit, 0, 0)
cmd, err := NewSQLCommand(t.Context(), "a", "", "select a from foo, bar", tt.limit, 0, 0)
require.NoError(t, err, "Failed to create SQL command")
vars := mathexp.Vars{}
@@ -154,7 +154,7 @@ func TestSQLCommandMetrics(t *testing.T) {
m := metrics.NewTestMetrics()
// Create a command
cmd, err := NewSQLCommand("A", "someformat", "select * from foo", 0, 0, 0)
cmd, err := NewSQLCommand(t.Context(), "A", "someformat", "select * from foo", 0, 0, 0)
require.NoError(t, err)
// Execute successful command