Skip to content

Commit

Permalink
test some dummy code
Browse files Browse the repository at this point in the history
  • Loading branch information
William Parsley committed Dec 12, 2023
1 parent 09d8f2b commit a863f29
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions go/internal/feast/transformation/transformation_service_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,36 @@
package transformation

import (
"github.com/stretchr/testify/assert"
"testing"
"testing"
"fmt"

"github.com/apache/arrow/go/v8/arrow"
"github.com/apache/arrow/go/v8/arrow/array"
"github.com/apache/arrow/go/v8/arrow/ipc"
"github.com/apache/arrow/go/v8/arrow/memory"
)

func TestSendGrpcRequest(t *testing.T) {
assert.Equal(t, true, true)
allocator := memory.NewGoAllocator()
dummyColumn := array.NewInt64Builder(allocator)


inputFields := make([]arrow.Field, 0)
inputColumns := make([]arrow.Array, 0)
for i := 0; i < 10; i++ {
for j := 0; j < 10; j++ {
dummyColumn.Append(int64(j))
}
inputFields = append(inputFields, arrow.Field{Name: fmt.Sprintf("Field %d", i), Type: &arrow.Int32Type{}})
inputColumns = append(inputColumns, dummyColumn.NewArray())
}

inputSchema := arrow.NewSchema(inputFields, nil)
inputRecord := array.NewRecord(inputSchema, inputColumns, int64(10))
defer inputRecord.Release()

recordValueWriter := new(ByteSliceWriter)
arrowWriter, _ := ipc.NewFileWriter(recordValueWriter, ipc.WithSchema(inputSchema))
arrowWriter.Write(inputRecord)
arrowWriter.Close()
}

0 comments on commit a863f29

Please sign in to comment.