matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.76k stars 274 forks source link

[Bug]: TPCH error report with DECIMAL type #3233

Closed dengn closed 2 years ago

dengn commented 2 years ago

Is there an existing issue for the same bug?

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93):e086b4d
- Hardware parameters:Mac M1 ARM 16GB
- OS type: OSX
- Others:

Actual Behavior

[ERROR]

l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedprice) as sum_base_price, sum(l_extendedprice (1 - l_discount)) as sum_disc_price, sum(l_extendedprice (1 - l_discount) (1 + l_tax)) as sum_charge, avg(l_quantity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_disc, count() as count_order from lineitem where l_shipdate <= date '1998-12-01' - interval '112' day group by l_returnflag, l_linestatus order by l_returnflag, l_linestatus ; [EXPECT RESULT]: l_returnflag l_linestatus sum_qty sum_base_price sum_disc_price sum_charge avg_qty avg_price avg_disc count_order A F 37474 3.756962463999998E7 3.5676192096999995E7 3.710141622242404E7 25.3545 25419.231826792948 0.050866035182679493 1478 N F 1041 1041301.07 999060.8979999998 1036450.80228 27.3947 27402.659736842103 0.042894736842105284 38 N O 73962 7.417730919999973E7 7.051221405270006E7 7.330801863822483E7 25.5217 25596.03492063483 0.04965148378191866 2898 R F 36511 3.657084124E7 3.473847287580004E7 3.616906011219294E7 25.0590 25100.09693891558 0.050027453671928686 1457 [ACTUAL RESULT]: Internal error: panic unexpected parameter types were received: goroutine 1545 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x68 github.com/matrixorigin/matrixone/pkg/common/moerr.NewPanicError({0x1067a5140?, 0x106b32340}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/common/moerr/error.go:91 +0x50 github.com/matrixorigin/matrixone/pkg/vm/overload.Run.func1() /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:50 +0x38 panic({0x1067a5140, 0x106b32340}) /usr/local/go/src/runtime/panic.go:838 +0x204 github.com/matrixorigin/matrixone/pkg/container/vector.MustTCols... /Users/nandeng/Test/matrixone_new/matrixone/pkg/container/vector/tools.go:34 github.com/matrixorigin/matrixone/pkg/sql/plan2/function/operator.MultDecimal64({0x14005aa2af0?, 0x0?, 0x0?}, 0x140085bb528?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/plan2/function/operator/mult.go:77 +0x7e8 github.com/matrixorigin/matrixone/pkg/sql/plan2/function.Function.VecFn({0xa, 0x0, 0x8, 0x2, {0x140001338ee, 0x2, 0x2}, 0x20, 0x106b29d60, 0x106b29a58, ...}, ...) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/plan2/function/function.go:141 +0x74 github.com/matrixorigin/matrixone/pkg/sql/colexec2.EvalExpr(0x14008a2a1e0, 0x140076a2420, 0x14008ec86c0?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/expr_eval.go:156 +0x1464 github.com/matrixorigin/matrixone/pkg/sql/colexec2/group.(Container).processWithGroup(0x140044af2c0, 0x14007a35ae0, 0x140076a2420) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/group/group.go:185 +0x1524 github.com/matrixorigin/matrixone/pkg/sql/colexec2/group.Call(0x140076a2420?, {0x10673b2a0?, 0x14007a35ae0?}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/group/group.go:64 +0x70 github.com/matrixorigin/matrixone/pkg/vm/overload.Run({0x140086e4960?, 0x4, 0x11?}, 0x11?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:54 +0xe4 github.com/matrixorigin/matrixone/pkg/vm/pipeline2.(Pipeline).Run(0x140085bbf10, {0x106b43f00, 0x1400824ca80}, 0x140076a2420) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/pipeline2/pipeline.go:78 +0x1cc github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).Run(0x140089f66e0?, {0x106b61340?, 0x1400012e3b8?}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:308 +0xac github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun.func1(0x14000192a80?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:326 +0x68 created by github.com/matrixorigin/matrixone/pkg/sql/compile2.(*Scope).MergeRun /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:321 +0x194

[ERROR]

c_custkey, c_name, sum(l_extendedprice (1 - l_discount)) as revenue, c_acctbal, n_name, c_address, c_phone, c_comment from customer, orders, lineitem, nation where c_custkey = o_custkey and l_orderkey = o_orderkey and o_orderdate >= date '1993-03-01' and o_orderdate < date '1993-03-01' + interval '3' month and l_returnflag = 'R' and c_nationkey = n_nationkey group by c_custkey, c_name, c_acctbal, c_phone, n_name, c_address, c_comment order by revenue desc limit 20 ; [EXPECT RESULT]: c_custkey c_name revenue c_acctbal n_name c_address c_phone c_comment 70 Customer#000000070 316759.42079999996 4867.52 RUSSIA mFowIuhnHjp2GjCiYYavkW kUwOjIaTCQ 32-828-107-2832 fter the special asymptotes. ideas after the unusual frets cajole quickly regular pinto be 109 Customer#000000109 272732.4698 -716.1 MOZAMBIQUE OOOkYBgCMzgMQXUmkocoLb56rfrdWp2NE2c 26-992-422-8153 es. fluffily final dependencies sleep along the blithely even pinto beans. final deposits haggle furiously furiou 106 Customer#000000106 175284.39829999997 3288.42 ARGENTINA xGCOEAUjUNG 11-751-989-4627 lose slyly. ironic accounts along the evenly regular theodolites wake about the special, final gifts. 2 Customer#000000002 121173.0081 121.65 JORDAN XSTf4,NCwDVaWNe6tEgvwfmRchLXak 23-768-687-3665 l accounts. blithely ironic theodolites integrate boldly: caref 100 Customer#000000100 113840.4294 9889.89 SAUDI ARABIA fptUABXcmkC5Wx 30-749-445-4907 was furiously fluffily quiet deposits. silent, pending requests boost against 58 Customer#000000058 103790.59319999999 6478.46 JORDAN g9ap7Dk1Sv9fcXEWjpMYpBZIRUohi T 23-244-493-2508 ideas. ironic ideas affix furiously express, final instructions. regular excuses use quickly e 94 Customer#000000094 100840.00200000001 5500.11 INDONESIA IfVNIN9KtkScJ9dUjK3Pg5gY1aFeaXewwf 19-953-499-8833 latelets across the bold, final requests sleep according to the fluffily bold accounts. unusual deposits amon 97 Customer#000000097 99194.2317 2164.48 PERU OApyejbhJG,0Iw3j rd1M 27-588-919-5638 haggle slyly. bold, special ideas are blithely above the thinly bold theo 101 Customer#000000101 90564.64779999999 7470.96 BRAZIL sMmL2rNeHDltovSm Y 12-514-298-3699 sleep. pending packages detect slyly ironic pack 52 Customer#000000052 85250.331 5630.28 IRAQ 7 QOqGqqSy9jfV51BC71jcHJSD0 21-186-284-5998 ic platelets use evenly even accounts. stealthy theodolites cajole furiou 142 Customer#000000142 74220.11069999999 2209.81 INDONESIA AnJ5lxtLjioClr2khl9pb8NLxG2, 19-407-425-2584 . even, express theodolites upo 59 Customer#000000059 71312.3586 3458.6 ARGENTINA zLOCP0wh92OtBihgspOGl4 11-355-584-3112 ously final packages haggle blithely after the express deposits. furiou 40 Customer#000000040 69690.69720000001 1335.3 CANADA gOnGWAyhSV1ofv 13-652-915-8939 rges impress after the slyly ironic courts. foxes are. blithely 8 Customer#000000008 67088.8134 6819.74 PERU I0B10bB0AymmC, 0PrRYBCP1yGJ8xcBPmWhl5 27-147-574-9335 among the slyly regular theodolites kindle blithely courts. carefully even theodolites haggle slyly along the ide 49 Customer#000000049 66789.796 4573.94 IRAN cNgAeX7Fqrdf7HQN9EwjUa4nxT,68L FKAxzl 20-908-631-4424 nusual foxes! fluffily pending packages maintain to the regular 26 Customer#000000026 66653.8296 5182.05 RUSSIA 8ljrc5ZeMl7UciP 32-363-455-4837 c requests use furiously ironic requests. slyly ironic dependencies us 77 Customer#000000077 65603.60399999999 1738.87 PERU 4tAE5KdMFGD4byHtXF92vx 27-269-357-4674 uffily silent requests. carefully ironic asymptotes among the ironic hockey players are carefully bli 136 Customer#000000136 64024.4532 -842.39 GERMANY QoLsJ0v5C1IQbh,DS1 17-501-210-4726 ackages sleep ironic, final courts. even requests above the blithely bold requests g 112 Customer#000000112 62915.441600000006 2953.35 ROMANIA RcfgG3bO7QeCnfjqJT1 29-233-262-8382 rmanently unusual multipliers. blithely ruthless deposits are furiously along the 80 Customer#000000080 57993.8394 7383.53 ALGERIA K,vtXp8qYB 10-267-172-7101 tect among the dependencies. bold accounts engage closely even pinto beans. ca [ACTUAL RESULT]: Internal error: panic runtime error: invalid memory address or nil pointer dereference: goroutine 1639 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x68 github.com/matrixorigin/matrixone/pkg/common/moerr.NewPanicError({0x10688e480?, 0x107c139a0}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/common/moerr/error.go:91 +0x50 github.com/matrixorigin/matrixone/pkg/vm/overload.Run.func1() /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:50 +0x38 panic({0x10688e480, 0x107c139a0}) /usr/local/go/src/runtime/panic.go:838 +0x204 github.com/matrixorigin/matrixone/pkg/compare/desc/decimal128s.(compare).Compare(0x14005000000?, 0x14005b927d0?, 0x105ea473c?, 0x14005b92a08?, 0x0?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/compare/desc/decimal128s/compare.go:30 +0xa8 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).compare(0x1400b384060, 0x14007b7e1f8?, 0x14007b7e1e0?, 0x14009acb0a0?, 0x14009cb4600?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/types.go:85 +0xa4 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).Less(0x14005b92a28?, 0x1048f8358?, 0x14005b929f8?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/types.go:97 +0x48 container/heap.down({0x106b60e40, 0x1400b384060}, 0x9, 0x14) /usr/local/go/src/container/heap/heap.go:112 +0xec container/heap.Init({0x106b60e40, 0x1400b384060}) /usr/local/go/src/container/heap/heap.go:46 +0x5c github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).sort(0x1400b384060?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:197 +0x48 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).processBatch(0x1400b384060, 0x14, 0x140076acb40, 0x14008d462c0) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:142 +0x484 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).build(0x1400b384060, 0x14007aaf4a0, 0x140076acb40, 0x14008d462c0) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:118 +0x3bc github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.Call(0x14008d462c0?, {0x10673bc20?, 0x14007aaf4a0?}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:63 +0x88 github.com/matrixorigin/matrixone/pkg/vm/overload.Run({0x1400b07a0c0?, 0x5, 0x0?}, 0x12fa6f470?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:54 +0xe4 github.com/matrixorigin/matrixone/pkg/vm/pipeline2.(Pipeline).MergeRun(0x1400968bf10, 0x14008d462c0) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/pipeline2/pipeline.go:134 +0x160 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun(0x140089f7900, {0x106b61340?, 0x1400012e3b8}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:355 +0x540 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun.func2(0x14000192a80?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:334 +0x68 created by github.com/matrixorigin/matrixone/pkg/sql/compile2.(*Scope).MergeRun /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:329 +0x2ac

[ERROR]

ps_partkey, sum(ps_supplycost ps_availqty) as value from partsupp, supplier, nation where ps_suppkey = s_suppkey and s_nationkey = n_nationkey and n_name = 'JAPAN' group by ps_partkey having sum(ps_supplycost ps_availqty) > ( select sum(ps_supplycost ps_availqty) 0.0001000000 from partsupp, supplier,nation where ps_suppkey = s_suppkey and s_nationkey = n_nationkey and n_name = 'JAPAN' ) order by value desc ; [EXPECT RESULT]: ps_partkey value [ACTUAL RESULT]: Operator '*' with parameters [DECIMAL64 DOUBLE] will be implemented in future version.

[ERROR]

100.00 sum(case when p_type like 'PROMO%' then l_extendedprice (1 - l_discount) else 0 end) / sum(l_extendedprice (1 - l_discount)) as promo_revenue from lineitem, part where l_partkey = p_partkey and l_shipdate >= date '1996-04-01' and l_shipdate < date '1996-04-01' + interval '1' month; [EXPECT RESULT]: promo_revenue 17.68284163936513 [ACTUAL RESULT]: Operator '' with parameters [DOUBLE DECIMAL64] will be implemented in future version.

[ERROR]

sum(l_extendedprice) / 7.0 as avg_yearly from lineitem, part where p_partkey = l_partkey and p_brand = 'Brand#54' and p_container = 'LG BAG' and l_quantity < ( select 0.2 avg(l_quantity) from lineitem where l_partkey = p_partkey ); [EXPECT RESULT]: avg_yearly null [ACTUAL RESULT]: Operator '' with parameters [DOUBLE DECIMAL128] will be implemented in future version.

[ERROR]

c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) from customer, orders, lineitem where o_orderkey in ( select l_orderkey from lineitem group by l_orderkey having sum(l_quantity) > 314 ) and c_custkey = o_custkey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice order by o_totalprice desc, o_orderdate limit 100 ; [EXPECT RESULT]: c_name c_custkey o_orderkey o_orderdate o_totalprice sum(l_quantity) [ACTUAL RESULT]: Internal error: panic runtime error: invalid memory address or nil pointer dereference: goroutine 1798 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x68 github.com/matrixorigin/matrixone/pkg/common/moerr.NewPanicError({0x10688e480?, 0x107c139a0}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/common/moerr/error.go:91 +0x50 github.com/matrixorigin/matrixone/pkg/vm/overload.Run.func1() /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:50 +0x38 panic({0x10688e480, 0x107c139a0}) /usr/local/go/src/runtime/panic.go:838 +0x204 github.com/matrixorigin/matrixone/pkg/compare/desc/decimal64s.(compare).Compare(0x14008aa3a38?, 0x1400acf7440?, 0x5002?, 0x1400a222800?, 0x14009952d40?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/compare/desc/decimal64s/compare.go:30 +0x90 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).compare(0x1400b4ebbc0, 0x14008d6f288?, 0x14008d6f270?, 0x1400a1fd600?, 0x14000648000?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/types.go:85 +0xa4 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).Less(0x14008aa39e8?, 0x10491d888?, 0x58?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/types.go:97 +0x48 container/heap.down({0x106b60e40, 0x1400b4ebbc0}, 0x31, 0x64) /usr/local/go/src/container/heap/heap.go:112 +0xec container/heap.Init({0x106b60e40, 0x1400b4ebbc0}) /usr/local/go/src/container/heap/heap.go:46 +0x5c github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).sort(0x1400b4ebbc0?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:197 +0x48 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).processBatch(0x1400b4ebbc0, 0x64, 0x14008a2a4b0, 0x1400b4ec790) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:142 +0x484 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).build(0x1400b4ebbc0, 0x14009830ab0, 0x14008a2a4b0, 0x1400b4ec790) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:118 +0x3bc github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.Call(0x1400b4ec790?, {0x10673bc20?, 0x14009830ab0?}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:63 +0x88 github.com/matrixorigin/matrixone/pkg/vm/overload.Run({0x14007dbde00?, 0x5, 0x0?}, 0x12fb23ab8?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:54 +0xe4 github.com/matrixorigin/matrixone/pkg/vm/pipeline2.(Pipeline).MergeRun(0x1400c339f10, 0x1400b4ec790) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/pipeline2/pipeline.go:134 +0x160 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun(0x14008d4d7c0, {0x106b61340?, 0x1400012e3b8}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:355 +0x540 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun.func2(0x1400451b800?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:334 +0x68 created by github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:329 +0x2ac

[ERROR]

s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_comment from part, supplier, partsupp, nation, region where p_partkey = ps_partkey and s_suppkey = ps_suppkey and p_size = 48 and p_type like '%TIN' and s_nationkey = n_nationkey and n_regionkey = r_regionkey and r_name = 'MIDDLE EAST' and ps_supplycost = ( select min(ps_supplycost) from partsupp, supplier, nation, region where p_partkey = ps_partkey and s_suppkey = ps_suppkey and s_nationkey = n_nationkey and n_regionkey = r_regionkey and r_name = 'MIDDLE EAST' ) order by s_acctbal desc, n_name, s_name, p_partkey limit 100 ; [EXPECT RESULT]: s_acctbal s_name n_name p_partkey p_mfgr s_address s_phone s_comment -283.84 Supplier#000000005 IRAQ 44 Manufacturer#4 Gcdm2rJRzl5qlTVzc 21-151-690-3663 . slyly regular pinto bea [ACTUAL RESULT]: s_acctbal s_name n_name p_partkey p_mfgr s_address s_phone s_comment

[ERROR]

s_name, s_address from supplier, nation where s_suppkey in ( select ps_suppkey from partsupp where ps_partkey in ( select p_partkey from part where p_name like 'lime%' ) and ps_availqty > ( select 0.5 sum(l_quantity) from lineitem where l_partkey = ps_partkey and l_suppkey = ps_suppkey and l_shipdate >= date '1993-01-01' and l_shipdate < date '1993-01-01' + interval '1' year ) ) and s_nationkey = n_nationkey and n_name = 'VIETNAM' order by s_name ; [EXPECT RESULT]: s_name s_address [ACTUAL RESULT]: Operator '' with parameters [DOUBLE DECIMAL64] will be implemented in future version.

[ERROR]

cntrycode, count() as numcust, sum(c_acctbal) as totacctbal from ( select substring(c_phone from 1 for 2) as cntrycode, c_acctbal from customer where substring(c_phone from 1 for 2) in ('10', '11', '26', '22', '19', '20', '27') and c_acctbal > ( select avg(c_acctbal) from customer where c_acctbal > 0.00 and substring(c_phone from 1 for 2) in ('10', '11', '26', '22', '19', '20', '27') ) and not exists ( select from orders where o_custkey = c_custkey ) ) as custsale group by cntrycode order by cntrycode ; [EXPECT RESULT]: cntrycode numcust totacctbal 11 4 29942.58 19 2 17120.35 20 1 9091.82 26 1 7354.23 [ACTUAL RESULT]: Operator '>' with parameters [DECIMAL64 DOUBLE] will be implemented in future version.

[ERROR]

l_orderkey, sum(l_extendedprice (1 - l_discount)) as revenue, o_orderdate, o_shippriority from customer, orders, lineitem where c_mktsegment = 'HOUSEHOLD' and c_custkey = o_custkey and l_orderkey = o_orderkey and o_orderdate < date '1995-03-29' and l_shipdate > date '1995-03-29' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10 ; [EXPECT RESULT]: l_orderkey revenue o_orderdate o_shippriority 643 174011.2942 1995-03-25 0 5444 166691.7175 1995-03-18 0 4642 113368.5066 1995-02-27 0 3749 83734.8686 1995-02-24 0 5955 65943.29920000001 1995-03-27 0 5765 65713.4436 1994-12-15 0 5636 64688.17799999999 1995-02-16 0 930 51611.76 1994-12-17 0 1445 44384.8914 1995-01-10 0 3399 36727.773 1995-02-28 0 [ACTUAL RESULT]: Internal error: panic runtime error: invalid memory address or nil pointer dereference: goroutine 2164 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x68 github.com/matrixorigin/matrixone/pkg/common/moerr.NewPanicError({0x10688e480?, 0x107c139a0}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/common/moerr/error.go:91 +0x50 github.com/matrixorigin/matrixone/pkg/vm/overload.Run.func1() /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:50 +0x38 panic({0x10688e480, 0x107c139a0}) /usr/local/go/src/runtime/panic.go:838 +0x204 github.com/matrixorigin/matrixone/pkg/compare/desc/decimal128s.(compare).Compare(0x12f948d50?, 0x1400ae81612?, 0x5000?, 0x1400b375400?, 0x140080aaec0?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/compare/desc/decimal128s/compare.go:30 +0xa8 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).compare(0x1400937c5a0, 0x16c1?, 0x14008f929f8?, 0x140080aaf80?, 0x1400ac7d300?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/types.go:85 +0xa4 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).Less(0x0?, 0x0?, 0x14008f929f8?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/types.go:97 +0x48 container/heap.down({0x106b60e40, 0x1400937c5a0}, 0x4, 0xa) /usr/local/go/src/container/heap/heap.go:112 +0xec container/heap.Init({0x106b60e40, 0x1400937c5a0}) /usr/local/go/src/container/heap/heap.go:46 +0x5c github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).sort(0x1400937c5a0?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:197 +0x48 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).processBatch(0x1400937c5a0, 0xa, 0x14008aa83c0, 0x1400c61def0) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:142 +0x484 github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.(Container).build(0x1400937c5a0, 0x14008d736e0, 0x14008aa83c0, 0x1400c61def0) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:118 +0x3bc github.com/matrixorigin/matrixone/pkg/sql/colexec2/top.Call(0x1400c61def0?, {0x10673bc20?, 0x14008d736e0?}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/top/top.go:63 +0x88 github.com/matrixorigin/matrixone/pkg/vm/overload.Run({0x1400b1e58c0?, 0x5, 0x0?}, 0x12fdce678?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:54 +0xe4 github.com/matrixorigin/matrixone/pkg/vm/pipeline2.(Pipeline).MergeRun(0x14004a6bf10, 0x1400c61def0) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/pipeline2/pipeline.go:134 +0x160 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun(0x140092ba640, {0x106b61340?, 0x1400012e3b8}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:355 +0x540 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun.func2(0x14009981c20?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:334 +0x68 created by github.com/matrixorigin/matrixone/pkg/sql/compile2.(*Scope).MergeRun /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:329 +0x2ac

[ERROR]

sum(l_extendedprice * l_discount) as revenue from lineitem where l_shipdate >= date '1994-01-01' and l_shipdate < date '1994-01-01' + interval '1' year and l_discount between 0.03 - 0.01 and 0.03 + 0.01 and l_quantity < 24; [EXPECT RESULT]: revenue 43092.5479 [ACTUAL RESULT]: Operator '>=' with parameters [DECIMAL64 DOUBLE] will be implemented in future version.

[ERROR]

sum(l_extendedprice * l_discount) as revenue from lineitem where l_shipdate >= date '1994-01-01' and l_shipdate < date '1994-01-01' + interval '1' year and l_discount between 0.03 - 0.01 and 0.03 + 0.01 and l_quantity < 24; [EXPECT RESULT]: revenue 43092.5479 [ACTUAL RESULT]: Operator '>=' with parameters [DECIMAL64 DOUBLE] will be implemented in future version.

[ERROR]

o_year, (sum(case when nation = 'ARGENTINA' then volume else 0 end) / sum(volume)) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_extendedprice (1 - l_discount) as volume, n2.n_name as nation from part, supplier, lineitem, orders, customer, nation n1, nation n2, region where p_partkey = l_partkey and s_suppkey = l_suppkey and l_orderkey = o_orderkey and o_custkey = c_custkey and c_nationkey = n1.n_nationkey and n1.n_regionkey = r_regionkey and r_name = 'AMERICA' and s_nationkey = n2.n_nationkey and o_orderdate between date '1995-01-01' and date '1996-12-31' and p_type = 'ECONOMY BURNISHED TIN' ) as all_nations group by o_year order by o_year ; [EXPECT RESULT]: o_year mkt_share 1995 0.0 1996 0.0 [ACTUAL RESULT]: Internal error: panic runtime error: unsafe.Slice: len out of range: goroutine 2473 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x68 github.com/matrixorigin/matrixone/pkg/common/moerr.NewPanicError({0x10688e480?, 0x106b3c0c0}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/common/moerr/error.go:91 +0x50 github.com/matrixorigin/matrixone/pkg/vm/overload.Run.func1() /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:50 +0x38 panic({0x10688e480, 0x106b3c0c0}) /usr/local/go/src/runtime/panic.go:838 +0x204 github.com/matrixorigin/matrixone/pkg/encoding.DecodeFixedSlice... /Users/nandeng/Test/matrixone_new/matrixone/pkg/encoding/encoding.go:210 github.com/matrixorigin/matrixone/pkg/container/vector.DecodeFixedCol... /Users/nandeng/Test/matrixone_new/matrixone/pkg/container/vector/vector.go:236 github.com/matrixorigin/matrixone/pkg/sql/plan2/function/operator.cwGeneral[...]({0x1400b503ea8, 0x3, 0x14000133a50}, 0x2?, {0x20?, 0x0, 0x0, 0x0, 0x0}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/plan2/function/operator/case_when.go:148 +0xec github.com/matrixorigin/matrixone/pkg/sql/plan2/function/operator.glob..func16({0x1400b503ea8?, 0x0?, 0x0?}, 0x140009f51e8?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/plan2/function/operator/case_when.go:96 +0x78 github.com/matrixorigin/matrixone/pkg/sql/plan2/function.Function.VecFn({0xf, 0x1, 0x0, 0x7, {0x0, 0x0, 0x0}, 0x20, 0x106b2a0b0, 0x106b29d00, ...}, ...) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/plan2/function/function.go:141 +0x74 github.com/matrixorigin/matrixone/pkg/sql/colexec2.EvalExpr(0x140079dc1e0, 0x140121924d0, 0x1302fffff?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/expr_eval.go:156 +0x1464 github.com/matrixorigin/matrixone/pkg/sql/colexec2/group.(Container).processWithGroup(0x1401220e000, 0x1400b577770, 0x140121924d0) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/group/group.go:185 +0x1524 github.com/matrixorigin/matrixone/pkg/sql/colexec2/group.Call(0x140121924d0?, {0x10673b2a0?, 0x1400b577770?}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/group/group.go:64 +0x70 github.com/matrixorigin/matrixone/pkg/vm/overload.Run({0x1400bc23aa0?, 0x4, 0x0?}, 0x1303aa3a0?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:54 +0xe4 github.com/matrixorigin/matrixone/pkg/vm/pipeline2.(Pipeline).MergeRun(0x140009f5c00, 0x140121924d0) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/pipeline2/pipeline.go:134 +0x160 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun(0x14012190500, {0x106b61340?, 0x1400012e3b8}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:355 +0x540 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).DispatchRun(0x14012190500, {0x106b61340, 0x1400012e3b8}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:417 +0x8b0 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).ParallelRun(0x1400bc23ec0?, {0x106b61340?, 0x1400012e3b8?}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:430 +0x15c github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).RemoteRun(0x14012190640?, {0x106b61340?, 0x1400012e3b8?}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:422 +0x28 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun.func3(0x1400019d960?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:342 +0x68 created by github.com/matrixorigin/matrixone/pkg/sql/compile2.(*Scope).MergeRun /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:337 +0x4ec

[ERROR]

nation, o_year, sum(amount) as sum_profit from ( select n_name as nation, extract(year from o_orderdate) as o_year, l_extendedprice (1 - l_discount) - ps_supplycost l_quantity as amount from part, supplier, lineitem, partsupp, orders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partkey = l_partkey and p_partkey = l_partkey and o_orderkey = l_orderkey and s_nationkey = n_nationkey and p_name like '%pink%' ) as profit group by nation, o_year order by nation, o_year desc ; [EXPECT RESULT]: nation o_year sum_profit ARGENTINA 1997 6575.493399999996 ARGENTINA 1996 12913.1476 ARGENTINA 1995 109908.39969999998 ARGENTINA 1994 39271.140400000004 ARGENTINA 1993 39770.69730000001 ARGENTINA 1992 35740.0 ETHIOPIA 1998 24489.149599999986 ETHIOPIA 1997 39665.26440000001 ETHIOPIA 1996 113173.09559999994 ETHIOPIA 1995 25732.7452 ETHIOPIA 1994 93731.1008 ETHIOPIA 1993 147385.872 ETHIOPIA 1992 66636.96160000001 IRAN 1998 116681.1813 IRAN 1997 50964.25839999999 IRAN 1996 185552.56340000004 IRAN 1995 103479.6512 IRAN 1994 164106.868 IRAN 1993 100245.65900000001 IRAN 1992 73757.954 IRAQ 1998 21292.037699999997 IRAQ 1997 128533.3496 IRAQ 1996 141170.6272 IRAQ 1995 16607.1624 IRAQ 1994 16515.2008 IRAQ 1993 138752.8297 IRAQ 1992 71365.98860000001 KENYA 1997 47549.35940000001 KENYA 1996 1866.6023999999998 KENYA 1995 13480.573400000003 KENYA 1994 54826.00119999999 KENYA 1993 111983.0035 KENYA 1992 7651.586600000001 MOROCCO 1998 225961.30579999997 MOROCCO 1997 288732.1257 MOROCCO 1996 295243.10189999995 MOROCCO 1995 255208.95809999996 MOROCCO 1994 158194.0814 MOROCCO 1993 159196.25280000002 MOROCCO 1992 256151.42539999998 PERU 1998 35151.868200000004 PERU 1997 99779.31980000006 PERU 1996 53735.25659999999 PERU 1995 71954.3164 PERU 1994 73084.5552 PERU 1993 95623.4989 PERU 1992 38212.4187 UNITED KINGDOM 1998 176649.9065 UNITED KINGDOM 1997 74705.25979999999 UNITED KINGDOM 1996 62768.51290000001 UNITED KINGDOM 1995 93466.7552 UNITED KINGDOM 1994 89094.2599 UNITED KINGDOM 1993 112886.5742 UNITED KINGDOM 1992 142060.96900000004 UNITED STATES 1997 111352.3559 UNITED STATES 1996 78268.86379999999 UNITED STATES 1995 251.2274 UNITED STATES 1994 57303.149999999994 UNITED STATES 1993 70350.5923 UNITED STATES 1992 65369.76119999998 [ACTUAL RESULT]: Internal error: panic unexpected parameter types were received: goroutine 2635 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x68 github.com/matrixorigin/matrixone/pkg/common/moerr.NewPanicError({0x1067a5140?, 0x106b32340}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/common/moerr/error.go:91 +0x50 github.com/matrixorigin/matrixone/pkg/vm/overload.Run.func1() /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:50 +0x38 panic({0x1067a5140, 0x106b32340}) /usr/local/go/src/runtime/panic.go:838 +0x204 github.com/matrixorigin/matrixone/pkg/container/vector.MustTCols... /Users/nandeng/Test/matrixone_new/matrixone/pkg/container/vector/tools.go:34 github.com/matrixorigin/matrixone/pkg/sql/plan2/function/operator.MinusDecimal64({0x1400be544b0?, 0x0?, 0x0?}, 0x140134153c8?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/plan2/function/operator/minus.go:75 +0x7e8 github.com/matrixorigin/matrixone/pkg/sql/plan2/function.Function.VecFn({0xa, 0x0, 0x8, 0x2, {0x140001338d4, 0x2, 0x2}, 0x20, 0x106b29d50, 0x106b29a58, ...}, ...) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/plan2/function/function.go:141 +0x74 github.com/matrixorigin/matrixone/pkg/sql/colexec2.EvalExpr(0x140079dd0e0, 0x14012260580, 0x1400b6b2c60?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/expr_eval.go:156 +0x1464 github.com/matrixorigin/matrixone/pkg/sql/colexec2/projection.Call(0x14012260580, {0x10673bae0?, 0x14007efcf48}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/colexec2/projection/projection.go:52 +0x140 github.com/matrixorigin/matrixone/pkg/vm/overload.Run({0x14009a57020?, 0x4, 0x0?}, 0x1303947a0?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/overload/run.go:54 +0xe4 github.com/matrixorigin/matrixone/pkg/vm/pipeline2.(Pipeline).MergeRun(0x14013415c00, 0x14012260580) /Users/nandeng/Test/matrixone_new/matrixone/pkg/vm/pipeline2/pipeline.go:134 +0x160 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun(0x1400b96fe00, {0x106b61340?, 0x1400012e3b8}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:355 +0x540 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).DispatchRun(0x1400b96fe00, {0x106b61340, 0x1400012e3b8}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:417 +0x8b0 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).ParallelRun(0x14009a57380?, {0x106b61340?, 0x1400012e3b8?}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:430 +0x15c github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).RemoteRun(0x1400b96ff40?, {0x106b61340?, 0x1400012e3b8?}) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:422 +0x28 github.com/matrixorigin/matrixone/pkg/sql/compile2.(Scope).MergeRun.func3(0x140001922a0?) /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:342 +0x68 created by github.com/matrixorigin/matrixone/pkg/sql/compile2.(*Scope).MergeRun /Users/nandeng/Test/matrixone_new/matrixone/pkg/sql/compile2/scope.go:337 +0x4ec

Expected Behavior

No response

Steps to Reproduce

run MO-tester with the latest TPCH benchmark with DECIMAL types

https://github.com/matrixorigin/mo-tester/pull/67

Additional information

No response

broccoliSpicy commented 2 years ago

one tae panic remains

broccoliSpicy commented 2 years ago

fixed