Browse Source

printout test values

mq-subscribe
chrislu 9 months ago
parent
commit
313097aca0
  1. 12
      weed/mq/schema/write_parquet_test.go

12
weed/mq/schema/write_parquet_test.go

@ -10,7 +10,7 @@ import (
"testing" "testing"
) )
func TestWriteParquet(t *testing.T) {
func TestWriteReadParquet(t *testing.T) {
// create a schema_pb.RecordType // create a schema_pb.RecordType
recordType := NewRecordTypeBuilder(). recordType := NewRecordTypeBuilder().
AddLongField("ID"). AddLongField("ID").
@ -19,7 +19,7 @@ func TestWriteParquet(t *testing.T) {
AddStringField("zName"). AddStringField("zName").
AddListField("emails", TypeString)). AddListField("emails", TypeString)).
AddStringField("Company"). AddStringField("Company").
AddRecordField("zAddress", NewRecordTypeBuilder().
AddRecordField("Address", NewRecordTypeBuilder().
AddStringField("Street"). AddStringField("Street").
AddStringField("City")).Build() AddStringField("City")).Build()
fmt.Printf("RecordType: %v\n", recordType) fmt.Printf("RecordType: %v\n", recordType)
@ -77,11 +77,15 @@ func testWritingParquetFile(t *testing.T, count int, filename string, parquetSch
AddStringValue("Company", fmt.Sprintf("company_%d", i)).Build() AddStringValue("Company", fmt.Sprintf("company_%d", i)).Build()
AddRecordValue(rowBuilder, recordType, recordValue) AddRecordValue(rowBuilder, recordType, recordValue)
// fmt.Printf("RecordValue: %v\n", recordValue)
if count < 10 {
fmt.Printf("RecordValue: %v\n", recordValue)
}
row := rowBuilder.Row() row := rowBuilder.Row()
// fmt.Printf("Row: %+v\n", row)
if count < 10 {
fmt.Printf("Row: %+v\n", row)
}
if err != nil { if err != nil {
t.Fatalf("rowBuilder.Build failed: %v", err) t.Fatalf("rowBuilder.Build failed: %v", err)

Loading…
Cancel
Save