• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

babelfish-for-postgresql / babelfish_extensions / 8779073381 / 1
74%
BABEL_5_X_DEV: 77%

Build:
Build:
LAST BUILD BRANCH: BABEL-5577
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 23 Apr 2024 05:52AM UTC
Files 114
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Apr 2024 05:37AM UTC coverage: 72.937% (-0.01%) from 72.951%
8779073381.1

push

github

web-flow
Support unique constraints on nullable column with nulls not distinct (#2392)

Currently babelfish has supported UNIQUE indexes/constraints under the escape hatch 'escape_hatch_unique_constraint'. This is because the current implementation allows duplicate NULL values in a column even when there is a UNIQUE constraint on it.
While the correct expected behaviour for pltsql UNIQUE indexes should be to treat NULL values as NOT DISTINCT. So only one NULL value should be allowed in UNIQUE index. (reject duplicate nulls in column)
We use PGs null not distinct option on column definition to implement this. So pltsql UNIQUE COLUMN CONSTRAINT and CREATE UNIQUE INDEX would implicitly have the nulls not distinct option and only single NULL value will be allowed.

For UNIQUE COLUMN CONSTRAINT we re-write the query string in ANTLR parser while for CREATE INDEX we use the bison parser.

This PR also includes fix for NULLS ordering for UNIQUE indexes created through table or column constraints. Refer engine PR for more information.
Also INLINE INDEX is not currently supported and should throw unsupported error. Test cases added in BABEL-UNSUPPORTED
Remove the escape hatch 'escape_hatch_unique_constraint' since it is no longer needed.
Engine PR: babelfish-for-postgresql/postgresql_modified_for_babelfish#310
Extension PR: #2392
Issues Resolved

[BABEL-3571]

Signed-off-by: Tanzeel Khan <tzlkhan@amazon.com>

41152 of 56421 relevant lines covered (72.94%)

64847.0 hits per line

Source Files on job 8779073381.1
  • Tree
  • List 114
  • Changed 71
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 8779073381
  • 07ddc9c6 on github
  • Prev Job for on BABEL_3_X_DEV (#8741422626.1)
  • Next Job for on BABEL_3_X_DEV (#8801049503.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc