Skip to content

chore(sql): add GroupByArraySink#6237

Merged
bluestreak01 merged 21 commits intoquestdb:masterfrom
mcadariu:add_group_by_array_sink
Oct 23, 2025
Merged

chore(sql): add GroupByArraySink#6237
bluestreak01 merged 21 commits intoquestdb:masterfrom
mcadariu:add_group_by_array_sink

Conversation

@mcadariu
Copy link
Copy Markdown
Contributor

@mcadariu mcadariu commented Oct 6, 2025

Relates to #4120.

In #4097, a specialized allocator for aggregate functions was introduced and a couple of them migrated to use it.

This PR follows-up by adding GroupByArraySink which we will then use in a subsequent PR to port last(array).

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Oct 6, 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

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.

@puzpuzpuz puzpuzpuz added the Enhancement Enhance existing functionality label Oct 10, 2025
@puzpuzpuz
Copy link
Copy Markdown
Contributor

Linter step is unhappy with javadoc formatting. Could you add the missing padding?

--- a/core/src/main/java/io/questdb/cairo/arr/ArrayTypeDriver.java
+++ b/core/src/main/java/io/questdb/cairo/arr/ArrayTypeDriver.java
@@ -179,9 +179,9 @@ public class ArrayTypeDriver implements ColumnTypeDriver {
      * and a 4-byte type field. This compact format omits the type (known from context) and
      * uses a 4-byte dataSize instead of 8-byte totalSize.
      *
-     * @param addr the memory address to write to
-     * @param value the array to append
-     * @param nDims the number of dimensions
+     * @param addr     the memory address to write to
+     * @param value    the array to append
+     * @param nDims    the number of dimensions
      * @param elemSize the size of each element in bytes
      */
     public static void appendCompactPlainValue(long addr, ArrayView value, int nDims, int elemSize) {
@@ -342,8 +342,8 @@ public class ArrayTypeDriver implements ColumnTypeDriver {
      * This is the counterpart to {@link #appendCompactPlainValue} and differs from {@link #getPlainValue}
      * which expects an 8-byte size field and a type field in the layout.
      *
-     * @param addr the memory address to read from
-     * @param type the encoded array type (provided from context)
+     * @param addr  the memory address to read from
+     * @param type  the encoded array type (provided from context)
      * @param nDims the number of dimensions
      * @param value the borrowed array to populate
      * @return the populated array

@puzpuzpuz
Copy link
Copy Markdown
Contributor

The PR is almost there. Great job!

Copy link
Copy Markdown
Contributor

@puzpuzpuz puzpuzpuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the solid contribution!

@mcadariu
Copy link
Copy Markdown
Contributor Author

Thanks for the clear and quick feedback on this PR!

@mcadariu
Copy link
Copy Markdown
Contributor Author

@puzpuzpuz thanks for the approval! Is there anything else I can do for this PR? If it gets merged, I can proceed with doing last(array).

@puzpuzpuz
Copy link
Copy Markdown
Contributor

@puzpuzpuz thanks for the approval! Is there anything else I can do for this PR? If it gets merged, I can proceed with doing last(array).

Nope, nothing to do here. I don't have the merge permissions and the rest of the team is pretty busy, so it'll take some time. You could create a separate PR that is dependent on this one and, once this one is merged, simply do a rebase.

@mcadariu
Copy link
Copy Markdown
Contributor Author

Got it, thanks!

@bluestreak01 bluestreak01 changed the title Add GroupByArraySink chore(sql): add GroupByArraySink Oct 23, 2025
@bluestreak01 bluestreak01 merged commit 4fd2185 into questdb:master Oct 23, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Enhance existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants