-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
BugIncorrect or unexpected behaviorIncorrect or unexpected behaviorCoreRelated to storage, data type, etc.Related to storage, data type, etc.SQLIssues or changes relating to SQL executionIssues or changes relating to SQL execution
Description
Describe the bug
No response
To reproduce
Suspicious offending query is:
SELECT
timestamp as time,
exchange,
symbol,
count() as trades
FROM
table
WHERE
symbol ~ '.*-?ETH' and
timestamp BETWEEN '2022-08-17T13:05:43.981Z' AND '2022-08-17T19:05:43.981Z'
SAMPLE BY 1m
results in
2022-08-17T19:05:49.805401Z E i.q.c.p.PGWireServer
java.lang.StringIndexOutOfBoundsException: String index out of range: 8
at java.lang.StringLatin1.charAt(StringLatin1.java:48)
at java.lang.String.charAt(String.java:1515)
at java.lang.Character.codePointAt(Character.java:8910)
at java.util.regex.Pattern$CharPropertyGreedy.match(Pattern.java:4273)
at java.util.regex.Pattern$Start.match(Pattern.java:3608)
at java.util.regex.Matcher.search(Matcher.java:1728)
at java.util.regex.Matcher.find(Matcher.java:745)
at io.questdb.griffin.engine.functions.regex.MatchStrFunctionFactory$MatchConstPatternFunction.getBool(MatchStrFunctionFactory.java:100)
at io.questdb.griffin.engine.table.AsyncFilteredRecordCursorFactory.filter(AsyncFilteredRecordCursorFactory.java:167)
at io.questdb.cairo.sql.async.PageFrameReduceJob.reduce(PageFrameReduceJob.java:175)
at io.questdb.cairo.sql.async.PageFrameReduceJob.consumeQueue(PageFrameReduceJob.java:132)
at io.questdb.cairo.sql.async.PageFrameReduceJob.consumeQueue(PageFrameReduceJob.java:106)
at io.questdb.cairo.sql.async.PageFrameSequence.stealWork(PageFrameSequence.java:390)
at io.questdb.cairo.sql.async.PageFrameSequence.dispatch(PageFrameSequence.java:369)
at io.questdb.cairo.sql.async.PageFrameSequence.next(PageFrameSequence.java:294)
at io.questdb.griffin.engine.table.AsyncFilteredRecordCursor.fetchNextFrame(AsyncFilteredRecordCursor.java:184)
at io.questdb.griffin.engine.table.AsyncFilteredRecordCursor.of(AsyncFilteredRecordCursor.java:226)
at io.questdb.griffin.engine.table.AsyncFilteredRecordCursorFactory.getCursor(AsyncFilteredRecordCursorFactory.java:129)
at io.questdb.griffin.engine.table.SelectedRecordCursorFactory.getCursor(SelectedRecordCursorFactory.java:58)
at io.questdb.griffin.engine.groupby.SampleByFillNoneRecordCursorFactory.getCursor(SampleByFillNoneRecordCursorFactory.java:97)
at io.questdb.cutlass.pgwire.PGConnectionContext.setupFactoryAndCursor(PGConnectionContext.java:2488)
at io.questdb.cutlass.pgwire.PGConnectionContext$PGConnectionBatchCallback.postCompile(PGConnectionContext.java:2593)
at io.questdb.griffin.SqlCompiler.compileBatch(SqlCompiler.java:930)
at io.questdb.cutlass.pgwire.PGConnectionContext.processQuery(PGConnectionContext.java:2256)
at io.questdb.cutlass.pgwire.PGConnectionContext.parse(PGConnectionContext.java:1550)
at io.questdb.cutlass.pgwire.PGConnectionContext.handleClientOperation(PGConnectionContext.java:415)
at io.questdb.cutlass.pgwire.PGJobContext.handleClientOperation(PGJobContext.java:81)
at io.questdb.cutlass.pgwire.PGWireServer$1.lambda$$0(PGWireServer.java:81)
at io.questdb.network.AbstractIODispatcher.processIOQueue(AbstractIODispatcher.java:166)
at io.questdb.cutlass.pgwire.PGWireServer$1.run(PGWireServer.java:106)
at io.questdb.mp.Worker.run(Worker.java:116)
and subsequent TableReader leak
Expected Behavior
No resource leak
Environment
- **QuestDB version**:6.5
Additional context
No response
Metadata
Metadata
Assignees
Labels
BugIncorrect or unexpected behaviorIncorrect or unexpected behaviorCoreRelated to storage, data type, etc.Related to storage, data type, etc.SQLIssues or changes relating to SQL executionIssues or changes relating to SQL execution