Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ go.work.sum

# env file
.env
# IDEs
.idea/

# mac
.DS_Store
Expand Down
7 changes: 7 additions & 0 deletions internal/pkg/object/command/trino/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"net/http"
"os"
"strings"

"github.com/patterninc/heimdall/pkg/object/cluster"
"github.com/patterninc/heimdall/pkg/object/job"
Expand Down Expand Up @@ -61,6 +62,7 @@ func newRequest(r *plugin.Runtime, j *job.Job, c *cluster.Cluster) (*request, er
return nil, err
}
}
jobCtx.Query = normalizeTrinoQuery(jobCtx.Query)

// form context for trino request
req := &request{
Expand Down Expand Up @@ -177,3 +179,8 @@ func (r *request) api(req *http.Request) error {
return nil

}

func normalizeTrinoQuery(query string) string {
// Trino does not support semicolon at the end of the query, so we remove it if present
return strings.TrimSuffix(query, ";")
}