Skip to content

Bh/copilot test#9384

Merged
timsehn merged 21 commits intomainfrom
bh/copilot-test
Jun 25, 2025
Merged

Bh/copilot test#9384
timsehn merged 21 commits intomainfrom
bh/copilot-test

Conversation

@bheni
Copy link
Copy Markdown
Contributor

@bheni bheni commented Jun 24, 2025

No description provided.

@bheni bheni requested a review from Copilot June 24, 2025 00:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements new system tables and their integration tests to handle Dolt schemas history and diff data. Key changes include:

  • Adding integration tests for querying dolt_history_dolt_schemas and dolt_diff_dolt_schemas.
  • Introducing a new implementation for the dolt_history_dolt_schemas table.
  • Updating the database table lookup to handle schema history and diff tables.

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

File Description
integration-tests/bats/system-tables.bats Added integration tests for querying history and diff system tables
go/libraries/doltcore/sqle/integration_test/dolt_schemas_history_diff_test.go New tests for verifying schema history and diff tables
go/libraries/doltcore/sqle/dolt_schemas_history_table.go Implementation of the dolt_history_dolt_schemas system table
go/libraries/doltcore/sqle/database.go Updated handling to include schema history and diff tables

# dolt_diff_dolt_schemas starts empty
run dolt sql -q 'SELECT COUNT(*) FROM dolt_diff_dolt_schemas'
[ "$status" -eq 0 ]
[[ "$output" =~ " 0 " ]] || false
Copy link

Copilot AI Jun 24, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using regex anchors or trimming whitespace to ensure exact matching of numerical output rather than relying on substring matches, which could lead to false positives if formatting changes.

Suggested change
[[ "$output" =~ " 0 " ]] || false
[[ "$output" =~ ^0$ ]] || false

Copilot uses AI. Check for mistakes.
func (dsht *doltSchemasHistoryTable) PrimaryKeySchema() sql.PrimaryKeySchema {
return sql.PrimaryKeySchema{
Schema: dsht.Schema(),
PkOrdinals: []int{0, 1, 5}, // type, name, commit_hash
Copy link

Copilot AI Jun 24, 2025

Choose a reason for hiding this comment

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

[nitpick] Although the primary key composition is described by the comment, consider explicitly documenting the column ordering to improve clarity and facilitate future modifications.

Suggested change
PkOrdinals: []int{0, 1, 5}, // type, name, commit_hash
PkOrdinals: []int{0, 1, 5}, // Primary key columns:
// 0 - type (column index 0 in schema)
// 1 - name (column index 1 in schema)
// 5 - commit_hash (column index 5 in schema)

Copilot uses AI. Check for mistakes.
@coffeegoddd
Copy link
Copy Markdown
Contributor

@bheni DOLT

comparing_percentages
100.000000 to 100.000000
version result total
255c488 ok 5937457
version total_tests
255c488 5937457
correctness_percentage
100.0

@timsehn timsehn merged commit 255c488 into main Jun 25, 2025
55 of 56 checks passed
@Hydrocharged Hydrocharged deleted the bh/copilot-test branch December 15, 2025 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants