Skip to content

Commit 20f611f

Browse files
SNOW-116310: Adjust BINARY col size to match assertions (#1174)
1 parent 52590b9 commit 20f611f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

driver_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var (
3737

3838
const (
3939
selectNumberSQL = "SELECT %s::NUMBER(%v, %v) AS C"
40-
selectVariousTypes = "SELECT 1.0::NUMBER(30,2) as C1, 2::NUMBER(38,0) AS C2, 't3' AS C3, 4.2::DOUBLE AS C4, 'abcd'::BINARY AS C5, true AS C6"
40+
selectVariousTypes = "SELECT 1.0::NUMBER(30,2) as C1, 2::NUMBER(38,0) AS C2, 't3' AS C3, 4.2::DOUBLE AS C4, 'abcd'::BINARY(8388608) AS C5, true AS C6"
4141
selectRandomGenerator = "SELECT SEQ8(), RANDSTR(1000, RANDOM()) FROM TABLE(GENERATOR(ROWCOUNT=>%v))"
4242
PSTLocation = "America/Los_Angeles"
4343
)

put_get_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,13 @@ func TestPutGetMaxLOBSize(t *testing.T) {
645645
testCases := [5]int{smallSize, originSize, mediumSize, largeSize, maxLOBSize}
646646

647647
runDBTest(t, func(dbt *DBTest) {
648+
if maxLOBSize > originSize { // for increased max LOB size
649+
_, err := dbt.exec("alter session set ALLOW_LARGE_LOBS_IN_EXTERNAL_SCAN = true")
650+
if err != nil {
651+
dbt.Errorf("Unable to set ALLOW_LARGE_LOBS_IN_EXTERNAL_SCAN parameter for increased max LOB size")
652+
}
653+
defer dbt.mustExec("alter session unset ALLOW_LARGE_LOBS_IN_EXTERNAL_SCAN")
654+
}
648655
for _, tc := range testCases {
649656
// create the data file
650657
tmpDir := t.TempDir()

0 commit comments

Comments
 (0)