Skip to content

Commit

Permalink
Fixed errors after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivanshGahlot committed Dec 20, 2024
1 parent d23f409 commit c0f2b77
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions yb-voyager/src/query/queryissue/detectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion yb-voyager/src/query/queryissue/parser_issue_detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ func (p *ParserIssueDetector) genericIssues(query string) ([]QueryIssue, error)
xmlIssueAdded = true
}
}
result = append(result, issues...)
result = append(result, issue)
}
}

Expand Down

0 comments on commit c0f2b77

Please sign in to comment.