Skip to content

CSV download for view that exists on non-main branch errors #581

@tbantle22

Description

@tbantle22

We have a user that's trying to download a csv of a view on a branch that's not main and is getting a table not found error. We thought it was related to views not working with as of (this issue), but using the select * from `view-test/newbranch`.test2 syntax doesn't work either even though it works in dolt. It seems like something with how we set up the dolt database using in dolthubapi here. This is the PR where this was added

I added some unit tests here. I can get the branch test to pass by passing in the refName instead of an empty string to GetStreamingSqlReadQueryResults here but that doesn't work for commit refs

This is also reproducible on any repo with a view on a non-main branch using the DoltHub SQL console (example here) and comparing to Dolt

Image
taylor@MacBook-Pro-6 test-repo-mayo % dolt sql
# Welcome to the DoltSQL shell.
# Statements must be terminated with ';'.
# "exit" or "quit" (or Ctrl-D) to exit. "\help" for help.
test-repo-mayo/main> SELECT * FROM `test-repo-mayo/another-branch`.`only_on_branch`;
+----+------------+
| id | some_pk    |
+----+------------+
| 1  | 1705931475 |
+----+------------+
1 row in set (0.01 sec)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions