Skip to content
Closed
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
3 changes: 0 additions & 3 deletions src/Backend/opti-sql-go/Expr/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,15 +495,13 @@ func EvalBinary(b *BinaryExpr, batch *operators.RecordBatch) (arrow.Array, error
return unpackDatum(datum)
case Like:
if leftArr.DataType() != arrow.BinaryTypes.String || rightArr.DataType() != arrow.BinaryTypes.String {
// regEx runs only on strings
return nil, errors.New("binary operator Like only works on arrays of strings")
}
var compiledRegEx = compileSqlRegEx(rightArr.ValueStr(0))
filterBuilder := array.NewBooleanBuilder(memory.NewGoAllocator())
leftStrArray := leftArr.(*array.String)
for i := 0; i < leftStrArray.Len(); i++ {
valid := validRegEx(leftStrArray.Value(i), compiledRegEx)
fmt.Printf("does %s match %s: %v\n", leftStrArray.Value(i), compiledRegEx, valid)
filterBuilder.Append(valid)
}
return filterBuilder.NewArray(), nil
Expand Down Expand Up @@ -602,7 +600,6 @@ func EvalCast(c *CastExpr, batch *operators.RecordBatch) (arrow.Array, error) {
castOpts := compute.SafeCastOptions(c.TargetType)
out, err := compute.CastArray(context.TODO(), arr, castOpts)
if err != nil {
// This is a runtime cast error
return nil, fmt.Errorf("cast error: cannot cast %s to %s: %w",
arr.DataType(), c.TargetType, err)
}
Expand Down
3 changes: 2 additions & 1 deletion src/Backend/opti-sql-go/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module opti-sql-go

go 1.23
go 1.24.0

require (
github.com/apache/arrow/go/v15 v15.0.2
Expand Down Expand Up @@ -28,6 +28,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.13 // indirect
github.com/aws/smithy-go v1.23.2 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.3 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/flatbuffers v24.3.25+incompatible // indirect
Expand Down
2 changes: 2 additions & 0 deletions src/Backend/opti-sql-go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs=
github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
Expand Down
1 change: 0 additions & 1 deletion src/Backend/opti-sql-go/operators/aggr/avgExec.go

This file was deleted.

7 changes: 0 additions & 7 deletions src/Backend/opti-sql-go/operators/aggr/avgExec_test.go

This file was deleted.

5 changes: 0 additions & 5 deletions src/Backend/opti-sql-go/operators/aggr/basicAggr.go

This file was deleted.

7 changes: 0 additions & 7 deletions src/Backend/opti-sql-go/operators/aggr/basicAggr_test.go

This file was deleted.

Loading
Loading