GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(postgresw): Issue8562 IT inserts a scalar from its sub-query, refused as a list since #9110 by robfrank · Pull Request #9260 · ArcadeData/arcadedb

Conversation

@robfrank

@robfrank robfrank commented Oct 5, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

What does this PR do?

Fixes the red integration-tests job on main (run 37297724594). The only failure in that job was Issue8562DescribeStatementNamesReturnedColumnsIT.writeWithReturnIsDescribedAndExecuted:

[INSERT INTO Article8562 SET id = (SELECT max(id) FROM Article8562) RETURN id]
Expecting ['2', 'E', 'Z'] to contain ['D']

Statement S6 now reads SET id = (SELECT max(id) AS m FROM Article8562)[0].m, which still puts a sub-query inside an INSERT ... RETURN.

Motivation

The engine behavior is the intended one; the test statement was never valid:

  • A sub-query yields a list of rows, and id is declared INTEGER. Embedded, the original statement throws Cannot convert type 'class java.util.ArrayList' to 'INTEGER' found in property 'id', with or without rows in the type.
  • Before [engine] Type.convert silently stores or coerces values that the declared property type cannot take #9110 (fix(engine): Type.convert refuses values the declared property type cannot take (#9110) #9121), Type.convert cast the list to Number, swallowed the ClassCastException and returned null, so id was silently stored as null. The IT only checked that the Execute returned rows, so it passed.
  • fix(engine): Type.convert refuses values the declared property type cannot take (#9110) #9121 refuses an unconvertible value for a declared property instead of nulling it, so the Execute now answers ErrorResponse.

Related issues

#8562, #9110, #9121

Additional Notes

postgresw was the only module that failed in that job; no later module was skipped.

Checklist

  • I have run the build using mvn clean package command (mvn verify -Pintegration on postgresw for this IT: 2/2 green; it failed on unchanged main with the same ['2','E','Z'] as CI)
  • My unit tests cover both failure and success scenarios

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Corrected an integration test to read the aliased aggregate value from the first query result before using it in an insert. The test now checks the intended result-row behavior rather than treating the query response as a scalar.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@robfrank @claude
test(postgresw): Issue8562 IT inserts a scalar from its sub-query, re…
9e6d61e
…fused as a list since #9110

S6 set an INTEGER property to a bare sub-query, which yields a list of rows. Until #9110 the
conversion's ClassCastException was swallowed and the property was stored as null, so the
statement "worked"; #9121 refuses an unconvertible value for a declared property instead, the
Execute answered ErrorResponse and the IT went red. Take the scalar with [0].m, keeping a
sub-query inside an INSERT ... RETURN.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mergify

mergify Bot commented Oct 5, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@claude

claude Bot commented Oct 5, 2026

Copy link
Copy Markdown

Review: LGTM.

  • Change: one statement in a test, S6, now reads SET id = (SELECT max(id) AS m FROM Article8562)[0].m RETURN id. It keeps the intent of the IT (a sub-query inside INSERT ... RETURN is described and executed). It no longer relies on a list being coerced to INTEGER, which fix(engine): Type.convert refuses values the declared property type cannot take (#9110) #9121 now rejects.
  • Diagnosis: the PR description explains the root cause well. The old statement only passed because the list was silently stored as null, so the test was never valid.
  • Empty table: S5 deletes all rows before S6 runs. max on an empty set should still return one row with a null m, so [0].m gives null and the insert is accepted. The PR reports the IT green (2/2), so this holds.
  • Optional: the inline comment is a bit long. It could be shortened to "sub-query yields a list; [0].m extracts the scalar an INTEGER property accepts", with the history left to the PR description.
  • Not run: I read the diff only. I did not run the IT myself.

No bugs, security, or performance concerns.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codacy-production

codacy-production Bot commented Oct 5, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage ∅ diff coverage · -5.77% coverage variation

Metric Results
Coverage variation ✅ -5.77% coverage variation
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d4f5b8a) 213187 181482 85.13%
Head commit (9e6d61e) 245806 (+32619) 195078 (+13596) 79.36% (-5.77%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#9260) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 69a0c6cc-f4f8-4144-b814-49902dca985b
📥 Commits

Reviewing files that changed from the base of the PR and between b5792cc and 9e6d61e.

📒 Files selected for processing (1)
  • postgresw/src/test/java/com/arcadedb/postgres/Issue8562DescribeStatementNamesReturnedColumnsIT.java
 __________________________________________
< Every day I'm shufflin'... through code. >
 ------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@robfrank
robfrank merged commit 27065ea into main Oct 5, 2026
@robfrank
robfrank deleted the fix/postgres-insert-return-describe-it branch October 5, 2026 11:52
@codecov

codecov Bot commented Oct 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.90%. Comparing base (90fd682) to head (9e6d61e).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9260      +/-   ##
============================================
+ Coverage     76.88%   76.90%   +0.02%     
- Complexity     3979     3982       +3     
============================================
  Files          2127     2127              
  Lines        213187   213202      +15     
  Branches      45294    45295       +1     
============================================
+ Hits         163901   163967      +66     
+ Misses        31775    31734      -41     
+ Partials      17511    17501      -10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

robfrank added a commit that referenced this pull request Oct 6, 2026
@robfrank
test(postgresw): Issue8562 IT inserts a scalar from its sub-query, re…
d146bd5
…fused as a list since #9110 (#9260)

(cherry picked from commit 27065ea)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@robfrank
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.