From c0f2b77e31bba473d1fe30686c2730129d73ef30 Mon Sep 17 00:00:00 2001 From: ShivanshGahlot Date: Fri, 20 Dec 2024 05:01:45 +0000 Subject: [PATCH] Fixed errors after rebase --- yb-voyager/src/query/queryissue/detectors.go | 5 ----- yb-voyager/src/query/queryissue/parser_issue_detector.go | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/yb-voyager/src/query/queryissue/detectors.go b/yb-voyager/src/query/queryissue/detectors.go index 1dc2da714..391ff2558 100644 --- a/yb-voyager/src/query/queryissue/detectors.go +++ b/yb-voyager/src/query/queryissue/detectors.go @@ -16,8 +16,6 @@ limitations under the License. package queryissue import ( - "fmt" - mapset "github.com/deckarep/golang-set/v2" log "github.com/sirupsen/logrus" "google.golang.org/protobuf/reflect/protoreflect" @@ -206,12 +204,9 @@ func NewCopyCommandUnsupportedConstructsDetector(query string) *CopyCommandUnsup func (d *CopyCommandUnsupportedConstructsDetector) Detect(msg protoreflect.Message) error { // Check if the message is a COPY statement if msg.Descriptor().FullName() != queryparser.PG_QUERY_COPYSTSMT_NODE { - fmt.Println("Not a COPY statement") return nil // Not a COPY statement, nothing to detect } - fmt.Println("Copy command detected: ", msg) - // Check for COPY FROM ... WHERE clause isFromField := msg.Descriptor().Fields().ByName("is_from") whereField := msg.Descriptor().Fields().ByName("where_clause") diff --git a/yb-voyager/src/query/queryissue/parser_issue_detector.go b/yb-voyager/src/query/queryissue/parser_issue_detector.go index d653ff38c..a13604c57 100644 --- a/yb-voyager/src/query/queryissue/parser_issue_detector.go +++ b/yb-voyager/src/query/queryissue/parser_issue_detector.go @@ -413,7 +413,7 @@ func (p *ParserIssueDetector) genericIssues(query string) ([]QueryIssue, error) xmlIssueAdded = true } } - result = append(result, issues...) + result = append(result, issue) } }