From 31937b52192218de248a5f01a2c42693365e20ab Mon Sep 17 00:00:00 2001 From: Ryo Kanbayashi Date: Mon, 2 Sep 2024 19:21:07 +0900 Subject: [PATCH] implementing varchar support of btree index: TestKeyDuplicateBTreePrallelTxnStrideVarchar passed (poolSize=5000, parallel=20, 1000op, WITHOUT RANGE SCAN). --- .../executor_test/skiplist_index_executor_test.go | 8 ++++---- lib/samehada/samehada_util/samehada_util.go | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/execution/executors/executor_test/skiplist_index_executor_test.go b/lib/execution/executors/executor_test/skiplist_index_executor_test.go index af586f36..074d8486 100644 --- a/lib/execution/executors/executor_test/skiplist_index_executor_test.go +++ b/lib/execution/executors/executor_test/skiplist_index_executor_test.go @@ -616,10 +616,10 @@ func InnerTestParallelTxnsQueryingIndexUsedColumns[T int32 | float32 | string](t } common.ShPrintf(common.DEBUGGING, "ii=%d\n", ii) - // get 0-7 - opType := rand.Intn(8) - ////get 0-6 - //opType := rand.Intn(7) + //// get 0-7 + //opType := rand.Intn(8) + //get 0-6 + opType := rand.Intn(7) switch opType { case 0: // Update two account balance (move money) diff --git a/lib/samehada/samehada_util/samehada_util.go b/lib/samehada/samehada_util/samehada_util.go index 1686e4e7..b100b20c 100644 --- a/lib/samehada/samehada_util/samehada_util.go +++ b/lib/samehada/samehada_util/samehada_util.go @@ -150,7 +150,8 @@ func GetRandomPrimitiveVal[T int32 | float32 | string](keyType types.TypeID, max var ret interface{} = float32(val) return ret.(T) case types.Varchar: - var ret interface{} = *GetRandomStr(200) + //var ret interface{} = *GetRandomStr(200) + var ret interface{} = *GetRandomStr(50) return ret.(T) default: panic("not supported keyType")