str_concat_ws2.sim 7.2 KB
Newer Older
S
shenglian zhou 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
sleep 100
sql connect
sql use db

$emptyString = @@
print execute sql select concat_ws('sepa',stb1.c8,stb1.c14),pow(stba.c2,stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
sql select concat_ws('sepa',stb1.c8,stb1.c14),pow(stba.c2,stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
if $data00 != @123sepa1@ then
  return -1 
endi
if $data01 != @1.000000000@ then
  return -1 
endi
if $data10 != $emptyString then
  return -1 
endi
if $data11 != @4.000000000@ then
  return -1 
endi
if $data20 != @234sepa2@ then
  return -1 
endi
if $data21 != @27.000000000@ then
  return -1 
endi
if $data30 != $emptyString then
  return -1 
endi
if $data31 != @256.000000000@ then
  return -1 
endi
if $data40 != @456sepa4@ then
  return -1 
endi
if $data41 != @3125.000000000@ then
  return -1 
endi
if $data50 != @567sepa27@ then
  return -1 
endi
if $data51 != @46656.000000000@ then
  return -1 
endi
if $data60 != @678sepa@ then
  return -1 
endi
if $data61 != @823543.000000000@ then
  return -1 
endi
print execute sql select concat_ws('sepa', c8,c14) as a from stb1 union all select concat(c8,c14) as a from stba;
sql select concat_ws('sepa', c8,c14) as a from stb1 union all select concat(c8,c14) as a from stba;
if $data00 != @123sepa1@ then
  return -1 
endi
if $data10 != $emptyString then
  return -1 
endi
if $data20 != @234sepa2@ then
  return -1 
endi
if $data30 != $emptyString then
  return -1 
endi
if $data40 != @456sepa4@ then
  return -1 
endi
if $data50 != @567sepa27@ then
  return -1 
endi
if $data60 != @678sepa@ then
  return -1 
endi
if $data70 != @111sepa1@ then
  return -1 
endi
if $data80 != @222sepa2@ then
  return -1 
endi
if $data90 != @333sepa3@ then
  return -1 
endi
print execute sql select concat_ws('sepa', c8,c14) from stba;
sql select concat_ws('sepa', c8,c14) from stba;
if $data00 != @111sepa1@ then
  return -1 
endi
if $data10 != @222sepa2@ then
  return -1 
endi
if $data20 != @333sepa3@ then
  return -1 
endi
if $data30 != @444sepa4@ then
  return -1 
endi
if $data40 != @555sepa5@ then
  return -1 
endi
if $data50 != @666sepa6@ then
  return -1 
endi
if $data60 != @777sepa7@ then
  return -1 
endi
if $data70 != @888sepa8@ then
  return -1 
endi
if $data80 != @999sepa9@ then
  return -1 
endi
if $data90 != @000sepa0@ then
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(min(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(min(c2) as binary(10))) from tba1;
116
if $data00 != @c8sepa0@ then
S
shenglian zhou 已提交
117 118 119 120
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(max(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(max(c2) as binary(10))) from tba1;
121
if $data00 != @c8sepa9@ then
S
shenglian zhou 已提交
122 123 124 125
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(count(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(count(c2) as binary(10))) from tba1;
126
if $data00 != @c8sepa30@ then
S
shenglian zhou 已提交
127 128 129 130
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(sum(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(sum(c2) as binary(10))) from tba1;
131
if $data00 != @c8sepa135@ then
S
shenglian zhou 已提交
132 133 134 135
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(avg(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(avg(c2) as binary(10))) from tba1;
136
if $data00 != @c8sepa4.500000@ then
S
shenglian zhou 已提交
137 138 139 140
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(percentile(c2, 10) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(percentile(c2, 10) as binary(10))) from tba1;
141
if $data00 != @c8sepa0.900000@ then
S
shenglian zhou 已提交
142 143 144 145
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(apercentile(c2, 10) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(apercentile(c2, 10) as binary(10))) from tba1;
146
if $data00 != @c8sepa0.000000@ then
S
shenglian zhou 已提交
147 148 149 150
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(stddev(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(stddev(c2) as binary(10))) from tba1;
151
if $data00 != @c8sepa2.872281@ then
S
shenglian zhou 已提交
152 153 154 155
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(spread(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(spread(c2) as binary(10))) from tba1;
156
if $data00 != @c8sepa9.000000@ then
S
shenglian zhou 已提交
157 158 159 160
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(twa(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(twa(c2) as binary(10))) from tba1;
161
if $data00 != @c8sepa4.637931@ then
S
shenglian zhou 已提交
162 163 164 165
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(elapsed(ts) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(elapsed(ts) as binary(10))) from tba1;
166
if $data00 != @c8sepa29000.0000@ then
S
shenglian zhou 已提交
167 168 169 170
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(rate(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(rate(c2) as binary(10))) from tba1;
171
if $data00 != @c8sepa0.896552@ then
S
shenglian zhou 已提交
172 173 174 175
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(irate(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(irate(c2) as binary(10))) from tba1;
176
if $data00 != @c8sepa0.000000@ then
S
shenglian zhou 已提交
177 178 179 180
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(first(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(first(c2) as binary(10))) from tba1;
181
if $data00 != @c8sepa1@ then
S
shenglian zhou 已提交
182 183 184 185
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(last(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(last(c2) as binary(10))) from tba1;
186
if $data00 != @c8sepa0@ then
S
shenglian zhou 已提交
187 188 189 190
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(last_row(c2) as binary(10))) from tba1;
sql select concat_ws('sepa','c8',cast(last_row(c2) as binary(10))) from tba1;
191
if $data00 != @c8sepa0@ then
S
shenglian zhou 已提交
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
  return -1 
endi
print execute sql select concat_ws('sepa','c8',cast(top(c2, 1) as binary(10))) from tba1;
sql_error select concat_ws('sepa','c8',cast(top(c2, 1) as binary(10))) from tba1;
print execute sql select concat_ws('sepa','c8',cast(bottom(c2, 1) as binary(10))) from tba1;
sql_error select concat_ws('sepa','c8',cast(bottom(c2, 1) as binary(10))) from tba1;
print execute sql select concat_ws('sepa','c8',cast(leastsquares(c2, 1, 1) as binary(10))) from tba1;
sql_error select concat_ws('sepa','c8',cast(leastsquares(c2, 1, 1) as binary(10))) from tba1;
print execute sql select concat_ws('sepa','c8',cast(derivative(c2, 1s, 0) as binary(10))) from tba1;
sql_error select concat_ws('sepa','c8',cast(derivative(c2, 1s, 0) as binary(10))) from tba1;
print execute sql select concat_ws('sepa','c8',cast(diff(c2) as binary(10))) from tba1;
sql_error select concat_ws('sepa','c8',cast(diff(c2) as binary(10))) from tba1;
print execute sql select concat_ws('sepa','c8',cast(csum(c2) as binary(10))) from tba1;
sql_error select concat_ws('sepa','c8',cast(csum(c2) as binary(10))) from tba1;
print execute sql select concat_ws('sepa','c8',cast(mavg(c2,2) as binary(10))) from tba1;
sql_error select concat_ws('sepa','c8',cast(mavg(c2,2) as binary(10))) from tba1;
print execute sql select concat_ws('sepa','c8',cast(sample(c2,2) as binary(10))) from tba1;
sql_error select concat_ws('sepa','c8',cast(sample(c2,2) as binary(10))) from tba1;
print execute sql select concat_ws('sepa','c8',cast(_block_dist() as binary(10))) from tba1;
sql_error select concat_ws('sepa','c8',cast(_block_dist() as binary(10))) from tba1;