Commit Graph

3510 Commits

Author SHA1 Message Date
Tim Sehn 689f5de5fb Fix bats test for real 2025-06-25 12:30:28 -07:00
Tim Sehn f1f63d679e Fixed tests 2025-06-25 11:58:38 -07:00
Tim Sehn 62fa01efc0 Implement dolt_history_dolt_procedures 2025-06-25 11:35:39 -07:00
Tim Sehn 7c3542a8ca Merge pull request #9361 from dolthub/tim/history-tables-dolt-schemas
Implemented `dolt_history_dolt_schemas` and `dolt_diff_dolt_schemas`
2025-06-25 10:52:35 -07:00
Elian 05843c704c rm already covered bats 2025-06-25 09:47:17 -07:00
Elian b244dfe7ac fix err check and multi remote branch test 2025-06-24 14:07:33 -07:00
Elian 631de0075e rm isBranch check in checkout func for existing with fallback 2025-06-24 14:07:33 -07:00
Elian 0a6ce282ff add test for multiple matching branch names 2025-06-24 14:07:33 -07:00
Elian 7492650c4a rm debug echo 2025-06-24 14:07:32 -07:00
Elian dc514c3fe4 rm branch deletion (branch never existed) 2025-06-24 14:07:32 -07:00
Elian 6d03674dfc fix non-regex cmp 2025-06-24 14:07:32 -07:00
Elian db81cea3b0 fix remotes bats test 2025-06-24 14:07:32 -07:00
Elian 3551bf15e1 amend empty-repo check with new tablespec errout 2025-06-24 14:07:32 -07:00
Elian f63c2e5507 add implicit local branch checkout bats and rm DWIM prefix 2025-06-24 14:07:32 -07:00
Elian 716c0f3fc9 rm debug prints 2025-06-24 14:07:32 -07:00
Elian 3604761820 add bats tests 2025-06-24 14:07:32 -07:00
James Cor 8ab572b767 [no-release-notes] backtick tests (#9380) 2025-06-24 12:56:17 -07:00
Neil Macneale IV 44d79e9c3b Merge pull request #9349 from codeaucafe/codeaucafe/feat/1083-validate-import-args-before-reading-import-rows
feat(import): validate primary keys early
2025-06-24 10:42:36 -07:00
Aaron Son 36afffdf19 Merge pull request #9383 from dolthub/aaron/clone-with-local-temp-files
go: clone: Fix dolt clone to work even when dolt startup logic detects that TMPDIR is not renamable to the local directory and it creates a .dolt/tmp directory.
2025-06-24 10:02:26 -07:00
David Dansby a0bfb9d1d7 refactor(import): address PR review feedback on bats tests
Remove unnecessary cleanup commands and update test comment format as
requested in code review. The test harness automatically handles file
cleanup, making manual rm commands redundant. Update test comment to
reference GitHub issue #1083 using the preferred format.

Refs: #1083
2025-06-23 23:16:19 -07:00
Elian 49d1ea1eaa Merge pull request #9379 from dolthub/elianddb/fix-8853-local-user-persist
Fix 8853 warn local user persists
2025-06-23 18:40:20 -07:00
Aaron Son f54449dbb2 go: clone: Fix dolt clone to work even when dolt startup logic detects that TMPDIR is not renamable to the local directory and it creates a .dolt/tmp directory. 2025-06-23 16:41:10 -07:00
Elian e9cb6dd798 switch to logrus, rm loop, and amend warning msg 2025-06-23 16:38:36 -07:00
Elian f973269400 add bats test 2025-06-23 16:38:35 -07:00
Nathan Gabrielson 1f08c69c90 stop skipping tests 2025-06-23 10:50:33 -07:00
Nathan Gabrielson 4cd3a04fc7 Small fixes 2025-06-23 10:50:33 -07:00
Nathan Gabrielson aefb178551 No more dEnv, get rid of bad sql interpolation 2025-06-23 10:50:33 -07:00
Nathan Gabrielson 0df5282be4 Couple things I forgot to change back 2025-06-23 10:50:33 -07:00
Nathan Gabrielson 50a3be6ea2 Query system table, code is now less headache inducing 2025-06-23 10:50:33 -07:00
Nathan Gabrielson 94730adc71 Rough draft for stash migration 2025-06-23 10:50:33 -07:00
David Dansby dd80d98dc9 fix(import): address PR feedback for primary key validation
Update validation function to support name mapping during primary key
validation, allowing users to specify primary keys using either
original CSV column names or mapped target column names when using
the --map option. Ensure validation is properly skipped when schema
files are provided since --pk and --schema parameters are mutually
exclusive.

Update test expectations in import-create-tables.bats to match the
existing detailed error message format that includes available columns,
rather than changing the error messages to match the old test
expectations. Move new validation tests from import-tables.bats to
import-create-tables.bats as requested in code review.

The two failing tests "try to table import with nonexistent --pk arg"
and "try to table import with one valid and one nonexistent --pk arg"
now pass because our early validation catches these errors before
InferSchema, producing more helpful error messages that include
available columns. Updated the test expectations to match our
validation's error format instead of the old generic "column not found"
message.

Refs: #1083
2025-06-19 23:12:48 -07:00
Tim Sehn 9bcadfe558 Made bats tests a bit more robust 2025-06-17 13:41:07 -07:00
Tim Sehn 6917d57ffd This seems like a working implementation finally. Will manually test 2025-06-17 13:26:54 -07:00
Tim Sehn a717f4b3cb Fix bug with working and staged 2025-06-17 12:07:51 -07:00
Tim Sehn 54a40eed53 Another pas. This time beter i think 2025-06-17 11:58:07 -07:00
Tim Sehn 448aeaa050 fix skipped bats test 2025-06-17 11:32:40 -07:00
Tim Sehn 830cb583fb Improve bats tests 2025-06-16 17:12:21 -07:00
Tim Sehn 16eb58221b More test fixes 2025-06-16 15:49:11 -07:00
Tim Sehn c5d5f19460 Added schema tests 2025-06-16 15:31:43 -07:00
Tim Sehn 69d39d1bfa Implemented dolt_history_dolt_schemas and dolt_diff_dolt_schemas 2025-06-16 15:01:50 -07:00
Aaron Son 3bbd4b2150 Merge pull request #9271 from dolthub/aaron/statspro-faster-analyze-table
go: sqle/statspro: Make ANALYZE TABLE faster by circumventing the rate limiter on stats work.
2025-06-13 09:58:41 -07:00
David Dansby d5a3c25678 feat(import): validate primary keys early
Add early validation to check if specified primary keys exist in the
import file's schema before processing rows. This prevents users from
waiting for large files to be processed only to discover that their
primary key column names are invalid.

Changes:
- Add validatePrimaryKeysAgainstSchema function to check primary key
  existence against file schema
- Integrate validation into newImportDataReader for create operations
- Provide helpful error messages listing available columns when
  primary keys are not found
- Add unit tests covering various validation scenarios
- Add BATS integration tests for CSV, PSV, and large file scenarios

The validation only runs for create operations when primary keys are
explicitly specified and no schema file is provided. This ensures
fast failure while maintaining backward compatibility.

Before: Users waited minutes for large files to process before seeing
"provided primary key not found" errors

After: Users get immediate feedback with helpful column suggestions

Refs: #1083
2025-06-12 23:47:34 -07:00
James Cor ad234919dc [no-release-notes] add integrations tests for go-mysql-org (#9333) 2025-06-12 16:08:42 -07:00
Aaron Son e47e203d45 Merge remote-tracking branch 'origin/main' into aaron/statspro-faster-analyze-table 2025-06-12 14:48:51 -07:00
Nathan Gabrielson 75cde3ea68 Unncessary variable declaration 2025-06-11 21:05:44 -07:00
Nathan Gabrielson 795dd4058f Expect is pain, expect is suffering 2025-06-11 21:02:48 -07:00
Nathan Gabrielson 8ca4bf3a32 Working tests + todo message for future improvmeent 2025-06-11 20:44:55 -07:00
Nathan Gabrielson 6cfa19f130 Some more changes, suffering with expect 2025-06-11 19:04:52 -07:00
Nathan Gabrielson c8a6b59d4a Merge pull request #9308 from dolthub/nathan/stashes
dolt_stash stored procedure
2025-06-11 14:03:55 -07:00
Aaron Son 6b13f0061b Merge pull request #9329 from dolthub/aaron/push-to-sql-server-during-gc-fixes
go: store/datas/database_common: store/nbs/store.go: Fix some issues when pushing to a dolt sql-server that is itself running GC.
2025-06-11 13:58:59 -07:00