Skip to content

fix(hive): map not-null metadata correctly - #2832

Open
HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/hive-not-null-metadata
Open

HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/hive-not-null-metadata

Conversation

@HandSonic

@HandSonic HandSonic commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Related issue

N/A - no matching issue was found.

Summary

Hive DESCRIBE FORMATTED parsing mapped entries from # Not Null Constraints to nullable value 1. JDBC and the shared metadata model use 0 for no-nulls and 1 for nullable, so NOT NULL columns were reported backwards. This change maps those constraints to 0 and leaves other column attributes unchanged.

Affected surfaces

  • Frontend / Web
  • Backend / API / Storage
  • Database plugin / Driver
  • JCEF / Desktop packaging
  • CI / Build / Release
  • Documentation only

Verification

  • Commands and results:
    • Red test returned nullable=1 for a NOT NULL column.
    • Focused Hive metadata test: 1 passed.
    • Hive module tests after rebase: 37 passed.
    • Plugin reactor package: succeeded.
    • Fork code and CodeQL checks: rerunning for the rebased head.
  • Manual verification: N/A - strict ResultSet proxies reproduce the real formatted metadata sections.
  • UI evidence: N/A

Risk and compatibility

  • Public API or stored data: No API or stored data changes.
  • Database or driver compatibility: Corrects Hive NOT NULL metadata to the existing JDBC convention.
  • Network, privacy, or security: N/A.
  • Community / Local / Pro boundary: Shared Community Hive plugin.
  • Backward compatibility: Columns without a NOT NULL constraint retain existing nullable metadata.

Reviewer map

  • Start here: the NOT NULL branch in HiveMetaData.columns and HiveNotNullMetadataTest.
  • Failure condition: constrained columns report nullable=1 or unrelated metadata parsing changes.
  • Rollback or disable path: Revert commit f0843e258cecfdfc527430de2e15034d11320425; no migration is required.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: OpenAI Codex assisted with diagnosis, implementation, automated tests, verification, and adversarial review.

@HandSonic
HandSonic force-pushed the fix/hive-not-null-metadata branch from fee5e07 to f0843e2 Compare September 3, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants