Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A query with a lot of ORs fails #443

Closed
s-yata opened this issue Dec 8, 2015 · 2 comments
Closed

A query with a lot of ORs fails #443

s-yata opened this issue Dec 8, 2015 · 2 comments
Assignees
Labels

Comments

@s-yata
Copy link
Contributor

s-yata commented Dec 8, 2015

Description

A select with a lot of ORs in its --query fails as follows:

> select article --match_columns body --query \
  '0 OR 1 OR 2 OR 3 OR 4 OR 5 OR 6 OR 7 OR 8 OR 9 OR \
   10 OR 11 OR 12 OR 13 OR 14 OR 15 OR 16 OR 17 OR 18 OR 19 OR \
   20 OR 21 OR 22 OR 23 OR 24 OR 25 OR 26 OR 27 OR 28 OR 29 OR \
   30 OR 31 OR 32 OR 33 OR 34 OR 35 OR 36 OR 37 OR 38 OR 39 OR \
   40 OR 41 OR 42 OR 43 OR 44 OR 45 OR 46 OR 47 OR 48 OR 49 OR \
   50 OR 51 OR 52 OR 53 OR 54 OR 55 OR 56 OR 57 OR 58 OR 59 OR \
   60 OR 61 OR 62 OR 63 OR 64 OR 65 OR 66 OR 67 OR 68 OR 69 OR \
   70 OR 71 OR 72 OR 73 OR 74 OR 75 OR 76 OR 77 OR 78 OR 79 OR \
   80 OR 81 OR 82 OR 83 OR 84 OR 85 OR 86 OR 87 OR 88 OR 89 OR \
   90 OR 91 OR 92 OR 93 OR 94 OR 95 OR 96 OR 97 OR 98 OR 99 OR \
   100 OR 101 OR 102 OR 103 OR 104 OR 105 OR 106 OR 107 OR 108 OR 109 OR \
   110 OR 111 OR 112 OR 113 OR 114 OR 115 OR 116 OR 117 OR 118 OR 119 OR \
   120 OR 121 OR 122 OR 123 OR 124 OR 125 OR 126 OR 127 OR 128 OR 129 OR \
   130 OR 131 OR 132 OR 133 OR 134 OR 135 OR 136 OR 137 OR 138 OR 139 OR \
   140 OR 141 OR 142 OR 143 OR 144 OR 145 OR 146 OR 147 OR 148 OR 149 OR \
   150 OR 151 OR 152 OR 153 OR 154 OR 155 OR 156 OR 157 OR 158 OR 159 OR \
   160 OR 161 OR 162 OR 163 OR 164 OR 165 OR 166 OR 167 OR 168 OR 169 OR \
   170 OR 171 OR 172 OR 173 OR 174 OR 175 OR 176 OR 177 OR 178 OR 179 OR \
   180 OR 181 OR 182 OR 183 OR 184 OR 185 OR 186 OR 187 OR 188 OR 189 OR \
   190 OR 191 OR 192 OR 193 OR 194 OR 195 OR 196 OR 197 OR 198 OR 199 OR \
   200 OR 201 OR 202 OR 203 OR 204 OR 205 OR 206 OR 207 OR 208 OR 209 OR \
   210 OR 211 OR 212 OR 213 OR 214 OR 215 OR 216 OR 217 OR 218 OR 219 OR \
   220 OR 221 OR 222 OR 223 OR 224 OR 225 OR 226 OR 227 OR 228 OR 229 OR \
   230 OR 231 OR 232 OR 233 OR 234 OR 235 OR 236 OR 237 OR 238 OR 239 OR \
   240 OR 241 OR 242 OR 243 OR 244 OR 245 OR 246 OR 247 OR 248 OR 249 OR \
   250 OR 251 OR 252 OR 253 OR 254 OR 255 OR 256'
[[-35,1449563985.26278,0.000534296035766602,"stack is full",
 [["grn_expr_append_obj","expr.c",741],[...]]],[]]

commands.txt

The above --query is the shortest case.
If there are 255 ORs in --query, the select does not fail.

Reported by Hiroyuki Sato. Thanks!!!

@s-yata s-yata self-assigned this Dec 8, 2015
@s-yata s-yata added the doing label Dec 8, 2015
@s-yata
Copy link
Contributor Author

s-yata commented Dec 8, 2015

In this case, the error message "stack is full" means that grn_expr.codes is exhausted.
When I set GRN_STACK_SIZE * 2 to grn_expr.codes_size, the select with 256 ORs succeeded.
I'll check whether or not grn_expr.codes is resizable.

s-yata added a commit that referenced this issue Dec 8, 2015
@s-yata
Copy link
Contributor Author

s-yata commented Dec 8, 2015

I've confirmed that the latest version can execute a select with 1000 ORs in --query.

ORx1000.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant