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

Lift update binding logic from DuckTableEntry to TableCatalogEntry #7874

Merged
merged 109 commits into from
Jun 13, 2023

Conversation

bleskes
Copy link
Contributor

@bleskes bleskes commented Jun 8, 2023

Binding the update operator requires some careful handling of indices. All of that currently happens in the DuckTableEntry class but it seems there's nothing really DuckTable specific in it. We can lift it to the base class TableCatalogEntry, so the logic is available for custom catalog implementation.

@Mytherin
Copy link
Collaborator

Mytherin commented Jun 8, 2023

Thanks for the PR! LGTM. This might require some tweaking in the SQLite extension as well. The single-file compilation (compiling with DISABLE_UNITY=1) is also failing in the CI - likely due to some missing includes. Could you have a look at that?

@bleskes
Copy link
Contributor Author

bleskes commented Jun 9, 2023

@Mytherin the compilation issue should be fixed now. Any tips on how to the SQLite extension? I'm not sure what the process is because in another repo

@Mytherin
Copy link
Collaborator

Mytherin commented Jun 9, 2023

Generally we send a PR to the external repo and merge it first, and then update extensions.csv with the new git hash as part of the PR here

bleskes added a commit to bleskes/sqlite_scanner that referenced this pull request Jun 9, 2023
@bleskes
Copy link
Contributor Author

bleskes commented Jun 9, 2023

@Mytherin I've put up a pr to sql lite, but I'm clearly not following the right process to validate it. Can you point me at where I can read the steps?

Mytherin added a commit to duckdb/sqlite_scanner that referenced this pull request Jun 9, 2023
@Mytherin
Copy link
Collaborator

Mytherin commented Jun 9, 2023

The SQLite scanner still uses the old extension mechanism which is not very well documented. You can update extensions.csv in this PR (and run the format fix) in order to move the SQLite version forward.

@bleskes
Copy link
Contributor Author

bleskes commented Jun 9, 2023

@Mytherin done. Thanks.

@bleskes
Copy link
Contributor Author

bleskes commented Jun 12, 2023

@Mytherin lmk if the thread santinzer issue looks to you like it was caused by this pr.

@Mytherin
Copy link
Collaborator

The thread sanitizer issues appear to be caused by GetStorageInfo not grabbing a lock correctly - which now triggers the issue because the function is used in more places. I have (hopefully) pushed a fix for this.

pdet and others added 24 commits June 12, 2023 15:34
The `DatabaseManager::default_database` is returned by `DatabaseManager::GetDefaultDatabase`
when the default catalog in the search path is invalid. This commit adds a method to change
`default_database`.
This makes it possible that new `Connection`s can use a database other than 'memory' as default.
…faultDatabase'

Most functions that call 'SetDefaultDatabase' will already have an active transaction,
hence it is not necessary to create a new one.
@@ -37,7 +37,7 @@ class TableFunction;
struct FunctionData;

class TableColumnInfo;
class TableIndexInfo;
class ColumnSegmentInfo;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
class ColumnSegmentInfo;
struct ColumnSegmentInfo;

Copy link
Contributor

@carlopi carlopi left a comment

Choose a reason for hiding this comment

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

  • I would add line:
catalog/catalog_entry/table_catalog_entry.cpp 3

somewhere in .github/config/uncovered_lines.csv.

Thanks!

src/include/duckdb/storage/table/row_group.hpp Outdated Show resolved Hide resolved
src/include/duckdb/storage/table/row_group_collection.hpp Outdated Show resolved Hide resolved
Mytherin and others added 3 commits June 12, 2023 22:56
Co-authored-by: Carlo Piovesan <piovesan.carlo@gmail.com>
@Mytherin Mytherin merged commit 4b9c7fb into duckdb:master Jun 13, 2023
86 checks passed
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.

None yet