Skip to content

Fixed bug with generated values not being properly quoted#1239

Merged
zachmu merged 5 commits intomainfrom
zachmu/column-default-bug
Mar 3, 2025
Merged

Fixed bug with generated values not being properly quoted#1239
zachmu merged 5 commits intomainfrom
zachmu/column-default-bug

Conversation

@zachmu
Copy link
Copy Markdown
Member

@zachmu zachmu commented Feb 28, 2025

This wasn't due to a bug in GMS, but rather a bug in our CreateTable wrapper node. This wasn't caught earlier because column default values in postgres can't contain column references, only generated columns can.

Fixing this bug exposed others, namely when using functions in check constraints.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 28, 2025

Main PR
covering_index_scan_postgres 363.25/s 360.83/s -0.7%
index_join_postgres 152.00/s 152.18/s +0.1%
index_join_scan_postgres 182.75/s 181.23/s -0.9%
index_scan_postgres 12.04/s 11.93/s -1.0%
oltp_point_select 2772.46/s 2780.61/s +0.2%
oltp_read_only 1877.04/s 1847.48/s -1.6%
select_random_points 110.99/s 109.93/s -1.0%
select_random_ranges 128.29/s 127.10/s -1.0%
table_scan_postgres 9.86/s 9.85/s -0.2%
types_table_scan_postgres 5.11/s 5.22/s +2.1%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 28, 2025

Main PR
Total 42090 42090
Successful 15684 15686
Failures 26406 26404
Partial Successes1 5209 5209
Main PR
Successful 37.2630% 37.2678%
Failures 62.7370% 62.7322%

${\color{lightgreen}Progressions (2)}$

subselect

QUERY: with recursive x(a) as
  ((values ('a'), ('b'))
   union all
   (with z as not materialized (select * from x)
    select z.a || z.a as a from z
    where length(z.a || z.a) < 5))
select * from x;

updatable_views

QUERY: CREATE VIEW rw_view15 AS SELECT a, upper(b) FROM base_tbl;

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

@zachmu zachmu requested a review from Hydrocharged February 28, 2025 23:11
Copy link
Copy Markdown
Collaborator

@Hydrocharged Hydrocharged left a comment

Choose a reason for hiding this comment

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

LGTM! Attempting to restrain myself from saying to add function comments lol

@zachmu zachmu enabled auto-merge March 1, 2025 00:26
@zachmu zachmu merged commit ec5c68d into main Mar 3, 2025
14 checks passed
@zachmu zachmu deleted the zachmu/column-default-bug branch March 3, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants