https://questdb.io logo
Title
m

Mark

01/17/2023, 4:56 PM
I have a table
logs
with several values in it. However, I'm getting some odd behavior (details in comment). Any idea what I'm doing wrong here?
CREATE TABLE IF NOT EXISTS 'logs'
(
  'id'      symbol CAPACITY 2,
  'service' symbol CAPACITY 10 INDEX CAPACITY 12288,
  'level'   symbol CAPACITY 5 INDEX CAPACITY 2048,
  'source'  string,
  'message' string,
  'ts'      timestamp
) timestamp(ts) PARTITION BY month;
When I select the values from the table I get the expected results:
select id from logs;
1
1
-1237378975
4
10
11
8
10
4
10
However, when I add a where clause, the query either gives a type conversion error (probably not an issue) or returns no result even though there should be:
select id from logs where id = 10;
X unexpected argument for function: =. expected args: (STRING,STRING). actual args: (SYMBOL,INT constant)

select id from logs where id = '10';
Gives no results <<<
j

javier ramirez

01/17/2023, 5:32 PM
Hi Mark. I tried and got the same result as you, but when changed the symbol capacity for that column to 32 everything works. It seems there is some bug there and you might want to report it at https://github.com/questdb/questdb/issues. In the meantime using a larger capacity should work for you
c

conrad vermeulen

01/17/2023, 5:33 PM
Yeah, spotted the same. Adjusting the capacity seems to help.
m

Mark

01/17/2023, 5:48 PM
Okay awesome. I thought that may be what it was. When changing all
id
values to
10
though it doesn't seem to work still which is interesting
Appreciate the input
b

Bolek Ziobrowski

01/18/2023, 9:16 AM
j

javier ramirez

01/18/2023, 9:17 AM
Thank you!