Skip to content

Commit 9c411db

Browse files
committed
Revert "fix: Validate and normalize inet test values (#2205)"
This reverts commit c9f45a2.
1 parent 3955c1d commit 9c411db

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

schema/testdata.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"encoding/base64"
66
"fmt"
77
"math/rand"
8-
"net"
98
"strconv"
109
"strings"
1110
"time"
@@ -317,11 +316,9 @@ func (tg TestDataGenerator) getExampleJSON(colName string, dataType arrow.DataTy
317316

318317
// Generate a CIDR prefix length between 8 and 30
319318
cidr := 8 + rnd.Intn(23)
320-
input := fmt.Sprintf(`%d.%d.%d.%d/%d`, ip[0], ip[1], ip[2], ip[3], cidr)
321-
_, data, _ := net.ParseCIDR(input)
322319

323320
// Format as an IP address with CIDR notation
324-
return fmt.Sprintf(`"%s"`, data.String())
321+
return fmt.Sprintf(`"%d.%d.%d.%d/%d"`, ip[0], ip[1], ip[2], ip[3], cidr)
325322
}
326323
if arrow.TypeEqual(dataType, types.ExtensionTypes.MAC) {
327324
mac := make([]byte, 6)

0 commit comments

Comments
 (0)