Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doltgres 0.14.0 #197144

Closed
wants to merge 1 commit into from
Closed

doltgres 0.14.0 #197144

wants to merge 1 commit into from

Conversation

BrewTestBot
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

release notes
# Merged PRs

doltgresql

  • 934: support VALUES()
    Add support for select ... from (values (...), (...), ...) sqa statements
  • 921: more partition no-ops
  • 919: support multi-alter statements
    We support multi alter statements, so we shouldn't error.
  • 918: partitions are no-ops
    We parse, but ignore, PARTITION BY clauses in CREATE TABLE statements in gms, so do the same thing here.
    Docs noting this here: update doltgres partition docs dolthub/docs#2392
  • 909: have rootFinalizerIter implement sql.MutableRowIter
    We've moved rules out of analyzer into FinalizeIters so the applyRowUpdateAccumulator is applied afterwards.
    However, this seems to be a special sql.RowIter, so we need to expose the child iterators through the sql.CustomRowIter interface to apply that rule
  • 908: Tests for system tables with _$tablename
    Dolt PR: Support multiple schema for system tables with $tablename for doltgres dolthub/dolt#8527
  • 901: More system table updates, add and unskip some tests
  • 898: more unskipped engine tests
  • 887: Bug fix: Make db.Ping(ctx) work correctly with Doltgres
    Implementations of db.Ping(ctx) from Go's database/sql package typically send some sort of empty query to test the liveness of a database connection. For example, the pq library sends ; and the pgx library sends -- ping.
    Before this change, Doltgres' parser would return an empty statement, instead of Vitess' ErrEmpty error, which caused GMS to try and execute a nil analyzed plan for these statements, return an error, and the ping check would fail. This change makes the Doltgres parser return the same Vitess ErrEmpty error that the Vitess parser throws, sending the same signal to GMS to handle an empty statement without returning an error to the client. The related PR Update Parser interface documentation dolthub/go-mysql-server#2716 updates the Parser interface documentation to explicitly call out the requirement to return ErrEmpty in order for empty statements to be handled correctly.
    For testing, I've added some no-op statements to the smoke tests, but since these tests go through as prepared statements, they don't follow the exact code path as db.Ping(ctx), so I've also added calls to db.Ping(ctx) in the test framework, which do reproduce this error. I've also added a unit test for Doltgres' Parser implementation that explicitly tests empty statement parsing.
    Fixes: db.Ping results in error dolthub/doltgresql#884
    Related to: Update Parser interface documentation dolthub/go-mysql-server#2716
  • 886: /testing/logictest/harness/doltgres_server_harness.go: skip db.Ping call
  • 882: drop domain support
    Added:
    • merge functionality for domain types
    • check for domain usage in tables for dropping domain
      TODO:
    • creating domain type creates instance of array type of this domain type
    • unique OID generated for each domain created
    • add domains to pg_type
    • ALTER TABLE (e.g.: modify existing column to domain type column)
    • use domain type as underlying type to another domain
  • 881: Update first batch of dolt system tables to use dolt schema
    • dolt_status -> dolt.status
    • dolt_branches -> dolt.branches
    • dolt_log -> dolt.log
    • dolt_tags -> dolt.tags
    • dolt_docs -> dolt.docs
      These changes are mostly backwards compatible, unless you have an existing doc in dolt_docs, which will need to be recreated after updating
  • 879: Allow nextval() to take a regclass instance
    Allows the nextval() function to take a regclass parameter. Also changes the output function of regclass so that the returned relation name is schema-qualified if the schema is not on search_path.
    This change also moves the GetCurrentSchemas() function into a new settings package to break a package import cycle. The new settings package is intended for low-level functions that access settings, without dependencies on other packages.
    Fixes: Column default value expression error dolthub/doltgresql#850
  • 878: tests for cross-schema foreign keys
    Depends on:
    Support for schema names in foreign key definitions dolthub/go-mysql-server#2713
    cross-schema foreign key support for doltgres tables dolthub/dolt#8479
  • 877: Function: set_config()
    Adds support for the set_config() function.
    Example Usage:
    SELECT set_config('mynamespace.foo', 'bar', false);
    set_config
    ------------
    bar
    SELECT current_setting('mynamespace.foo');
    current_setting
    -----------------
    bar
    Fixes: Support set_config() function dolthub/doltgresql#852
  • 872: rule changes
  • 868: More ALTER TABLE Support
    Adds support for additional ALTER TABLE syntax:
    • Adding a UNIQUE constraint
    • Adding a CHECK constraint
    • Dropping constraints
      Adding support for check constraints triggered an issue with string literal value quoting that affects check constraints and column defaults. The fix was to make expression.Literal.String() match the behavior of GMS' expression.Literal.String() method and quote string literals. This required fixing another spot where we had been adding in quotes for string literals, as well as a small change in GMS (Changing selectExprNeedsAlias to consider string literal quotes dolthub/go-mysql-server#2710).
      Fixes:
    • Support ALTER TABLE ... DROP CONSTRAINT dolthub/doltgresql#799
    • Support adding unique constraints through ALTER TABLE dolthub/doltgresql#800
       
      Regresions Report:
      The regressions listed below are a little tricky to read, but everything seems to be working correctly as far as I can tell. In the first regression listed (INSERT INTO inhg VALUES ('foo');), this query now fails, because a previous statement now executes correctly to add a check constraint to a table, but our CREATE TABLE LIKE logic incorrectly copies over check constraints.
      The rest of the regressions listed seem to actually be working correctly and I'm unable to repro problems with them, and they aren't reporting any errors in the regression report. For example, I've confirmed that the regression reported for ALTER TABLE inhx add constraint foo CHECK (xx = 'text'); actually executes correctly without error now, while on main it returns the error: ALTER TABLE with unsupported constraint definition type *tree.AlterTableAddConstraint.
  • 867: Release v0.13.0
    Created by the Release workflow to update DoltgreSQL's version
  • 863: Added GRANT, REVOKE, Privilege Checking, Ownership, and persisting changes
    This adds the majority of the core functionality that was missing for users, authorization, and privilege checking. This is missing rigorous testing, but that will be added in a separate PR (both engine and bats). All changes that will accompany those tests (such as missing statement support) will also be added in separate PRs.
  • 845: add create domain and domain usage support
    Depends on: expose planbuilder methods for domain support in Doltgres dolthub/go-mysql-server#2697
    TODO:
    • add merge functionality for domains
    • creating domain type creates instance of array type of this domain type
    • unique OID generated for each domain created
    • track domain usage in table for dropping domain
    • add domains to pg_type
    • ALTER TABLE (e.g.: modify existing column to domain type column)
    • use domain type as underlying type to another domain

Closed Issues

  • 884: db.Ping results in error
  • 850: Column default value expression error
  • 852: Support set_config() function
  • 799: Support ALTER TABLE ... DROP CONSTRAINT
  • 800: Support adding unique constraints through ALTER TABLE

@github-actions github-actions bot added go Go use is a significant feature of the PR or issue bump-formula-pr PR was created using `brew bump-formula-pr` labels Nov 9, 2024
@daeho-ro daeho-ro added test failure CI fails while running the test-do block CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. labels Nov 9, 2024
@chenrui333
Copy link
Member

  ==> /home/linuxbrew/.linuxbrew/opt/libpq/bin/psql -h 127.0.0.1 -p 46735 -U doltgres -c 'SELECT DATABASE()' 2>&1
  psql: error: connection to server at "127.0.0.1", port 46735 failed: Connection refused
  	Is the server running on that host and accepting TCP/IP connections?
  Killing child processes...
  Error: doltgres: failed
  An exception occurred within a child process:
    Minitest::Assertion: Expected: 0
    Actual: 2

doltgres: enable debug logging

Signed-off-by: Rui Chen <rui@chenrui.dev>
@fulghum fulghum mentioned this pull request Nov 12, 2024
6 tasks
@chenrui333
Copy link
Member

merge into #197487

@chenrui333 chenrui333 closed this Nov 12, 2024
@chenrui333 chenrui333 added the superseded PR was replaced by another PR label Nov 12, 2024
@github-actions github-actions bot deleted the bump-doltgres-0.14.0 branch November 12, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. go Go use is a significant feature of the PR or issue superseded PR was replaced by another PR test failure CI fails while running the test-do block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants