Skip to content

feat(pgwire): support VARCHAR[] bind variables for symbol/varchar/str IN expressions#6574

Merged
bluestreak01 merged 27 commits intomasterfrom
symbol_bind_variable
Dec 29, 2025
Merged

feat(pgwire): support VARCHAR[] bind variables for symbol/varchar/str IN expressions#6574
bluestreak01 merged 27 commits intomasterfrom
symbol_bind_variable

Conversation

@kafka1991
Copy link
Copy Markdown
Collaborator

@kafka1991 kafka1991 commented Dec 22, 2025

Support VARCHAR array bind variables in PGWire, enabling queries like:

PreparedStatement stmt = conn.prepareStatement(
    "SELECT * FROM t WHERE col IN (?)"
);
stmt.setArray(1, conn.createArrayOf("varchar", new String[]{"a", "b", "c"}));

Supported: SYMBOL/STRING/VARCHAR IN (?) with VARCHAR[] parameter.

Benefit: Reuse prepared statements with different value lists, reducing query compilation overhead.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 22, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch symbol_bind_variable

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kafka1991 kafka1991 marked this pull request as draft December 22, 2025 15:30
@kafka1991 kafka1991 changed the title feat(pgwire): suppory symbols list as bind variable feat(pgwire): support symbols list as bind variable Dec 22, 2025
@kafka1991 kafka1991 marked this pull request as ready for review December 23, 2025 09:56
@kafka1991 kafka1991 changed the title feat(pgwire): support symbols list as bind variable feat(pgwire): support VARCHAR[] bind variables for symbol/varchar/str IN expressions Dec 23, 2025
bluestreak01
bluestreak01 previously approved these changes Dec 28, 2025
@glasstiger
Copy link
Copy Markdown
Contributor

[PR Coverage check]

😍 pass : 682 / 806 (84.62%)

file detail

path covered line new line coverage
🔵 io/questdb/std/CharSequenceHashSet.java 0 10 00.00%
🔵 io/questdb/cairo/arr/FlatArrayView.java 0 1 00.00%
🔵 io/questdb/griffin/engine/functions/eq/EqTimestampCursorFunctionFactory.java 0 3 00.00%
🔵 io/questdb/griffin/engine/functions/bind/ArrayBindVariable.java 5 12 41.67%
🔵 io/questdb/cairo/wal/WalWriter.java 1 2 50.00%
🔵 io/questdb/griffin/SqlUtil.java 3 5 60.00%
🔵 io/questdb/cutlass/pgwire/PGPipelineEntry.java 33 53 62.26%
🔵 io/questdb/cairo/sql/async/PageFrameSequence.java 5 7 71.43%
🔵 io/questdb/cairo/pool/PoolConstants.java 5 7 71.43%
🔵 io/questdb/griffin/engine/functions/bool/InSymbolVarcharArrayFunctionFactory.java 54 74 72.97%
🔵 io/questdb/std/str/Utf8StringSinkList.java 51 67 76.12%
🔵 io/questdb/std/str/DirectUtf8StringList.java 18 22 81.82%
🔵 io/questdb/cutlass/pgwire/PGNonNullVarcharArrayView.java 60 71 84.51%
🔵 io/questdb/cairo/arr/VarcharArrayParser.java 187 210 89.05%
🔵 io/questdb/cairo/arr/ArrayTypeDriver.java 45 47 95.74%
🔵 io/questdb/griffin/engine/table/ReaderPoolRecordCursorFactory.java 2 2 100.00%
🔵 io/questdb/griffin/engine/table/AsyncFilteredNegativeLimitRecordCursor.java 1 1 100.00%
🔵 io/questdb/griffin/engine/table/AsyncFilteredRecordCursor.java 9 9 100.00%
🔵 io/questdb/griffin/engine/functions/bool/InStrFunctionFactory.java 1 1 100.00%
🔵 io/questdb/griffin/WhereClauseParser.java 2 2 100.00%
🔵 io/questdb/griffin/engine/functions/QuaternaryFunction.java 5 5 100.00%
🔵 io/questdb/griffin/engine/functions/bool/InSymbolFunctionFactory.java 2 2 100.00%
🔵 io/questdb/griffin/engine/functions/UnaryFunction.java 2 2 100.00%
🔵 io/questdb/griffin/engine/functions/bool/InStrVarcharArrayFunctionFactory.java 35 35 100.00%
🔵 io/questdb/griffin/engine/functions/bool/InSymbolCursorFunctionFactory.java 7 7 100.00%
🔵 io/questdb/PropertyKey.java 1 1 100.00%
🔵 io/questdb/cairo/TxnScoreboardPoolV2.java 1 1 100.00%
🔵 io/questdb/griffin/engine/functions/lt/GtTimestampCursorFunctionFactory.java 3 3 100.00%
🔵 io/questdb/cairo/pool/AbstractMultiTenantPool.java 18 18 100.00%
🔵 io/questdb/cairo/pool/WalWriterPool.java 2 2 100.00%
🔵 io/questdb/cairo/pool/SqlCompilerPool.java 1 1 100.00%
🔵 io/questdb/griffin/engine/functions/BinaryFunction.java 3 3 100.00%
🔵 io/questdb/griffin/engine/functions/TernaryFunction.java 4 4 100.00%
🔵 io/questdb/griffin/engine/table/AsyncFilteredRecordCursorFactory.java 7 7 100.00%
🔵 io/questdb/cairo/pool/TableMetadataPool.java 1 1 100.00%
🔵 io/questdb/jit/CompiledFilter.java 1 1 100.00%
🔵 io/questdb/griffin/engine/functions/regex/AbstractLikeSymbolFunctionFactory.java 8 8 100.00%
🔵 io/questdb/griffin/engine/table/AsyncFilterUtils.java 1 1 100.00%
🔵 io/questdb/griffin/FunctionParser.java 11 11 100.00%
🔵 io/questdb/griffin/engine/functions/lt/LtTimestampCursorFunctionFactory.java 3 3 100.00%
🔵 io/questdb/griffin/engine/functions/bool/InVarcharVarcharArrayFunctionFactory.java 32 32 100.00%
🔵 io/questdb/cairo/CairoEngine.java 1 1 100.00%
🔵 io/questdb/cairo/sql/async/PageFrameReduceTask.java 3 3 100.00%
🔵 io/questdb/std/DirectLongList.java 7 7 100.00%
🔵 io/questdb/griffin/engine/table/AsyncJitFilteredRecordCursorFactory.java 16 16 100.00%
🔵 io/questdb/cairo/pool/SequencerMetadataPool.java 1 1 100.00%
🔵 io/questdb/griffin/engine/functions/bool/InVarcharFunctionFactory.java 1 1 100.00%
🔵 io/questdb/cairo/arr/ArrayView.java 1 1 100.00%
🔵 io/questdb/cairo/pool/ReaderPool.java 4 4 100.00%
🔵 io/questdb/griffin/FunctionFactory.java 1 1 100.00%
🔵 io/questdb/cutlass/pgwire/PGOids.java 15 15 100.00%
🔵 io/questdb/griffin/engine/functions/MultiArgFunction.java 2 2 100.00%

@bluestreak01 bluestreak01 merged commit 44424c8 into master Dec 29, 2025
43 checks passed
@bluestreak01 bluestreak01 deleted the symbol_bind_variable branch December 29, 2025 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants