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
8 changes: 4 additions & 4 deletions max2max/internal/loader/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ func NewMergeLoader(logger *slog.Logger) *mergeLoader {
}
}

func (l *mergeLoader) GetQuery(tableID, query string) string {
return "-- TODO merge loader"
func (l *mergeLoader) GetQuery(_, query string) string {
return query
}

func (l *mergeLoader) GetPartitionedQuery(tableID, query string, partitionName []string) string {
return "-- TODO merge loader"
func (l *mergeLoader) GetPartitionedQuery(_, query string, _ []string) string {
return query
}
8 changes: 5 additions & 3 deletions max2max/internal/loader/replace.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package loader

import (
"fmt"
"log/slog"
"strings"
)

type replaceLoader struct {
Expand All @@ -15,9 +17,9 @@ func NewReplaceLoader(logger *slog.Logger) *replaceLoader {
}

func (l *replaceLoader) GetQuery(tableID, query string) string {
return "-- TODO replace loader"
return fmt.Sprintf("INSERT OVERWRITE TABLE %s %s", tableID, query)
}

func (l *replaceLoader) GetPartitionedQuery(tableID, query string, partitionName []string) string {
return "-- TODO replace loader"
func (l *replaceLoader) GetPartitionedQuery(tableID, query string, partitionNames []string) string {
return fmt.Sprintf("INSERT OVERWRITE TABLE %s PARTITION (%s) %s", tableID, strings.Join(partitionNames, ", "), query)
}
Loading