Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

MAX() inside PIVOT yielding crazy results for value from window function

Open
#128 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, sql
Domain
databases

Research direction

Reproduce the reported PIVOT query using MAX() on a window-function value with jar 1.0.0 and 1.1.3, then compare the results with max(arg, n), first(), and sum(). The issue does not name a source file or test, so first identify the JDBC or SQL execution path that handles these aggregate results and add a regression test once the failure is isolated.

Written by the indexing model from the issue text.

Description

After switching from jar 1.0.0 to jar 1.1.3 I get wild values for a function that worked before, where I PIVOT using MAX() on the value from a window function:

Image

Before the switch I saw correct values. When I use max(arg, n), I see the correct values again (but as a list):

Image

first() also yields these crazy values. sum() works.

Dominant language
C++
Stars
127
Forks
81
Avg merge
7h 57m
Merged PRs (30d)
38

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from duckdb/duckdb-java

All issues in duckdb/duckdb-java

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.