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

Can't seem to read a table (unexpected error, crashes JVM processes) #86

Closed
shanielh opened this issue Dec 2, 2024 · 2 comments
Closed

Comments

@shanielh
Copy link

shanielh commented Dec 2, 2024

I tried both using DuckDB 1.1.3 (Latest as of this post) and 1.2.0-SNAPSHOT (using DBeaver).

Reproduction:

  1. Download and open the Archive.zip to /tmp/default_storage_173276977134208/tables/00000000-0000-0000-0000-00000ee128fc
  2. Run the following SQL commands :
INSTALL iceberg;
LOAD iceberg;

SELECT * FROM iceberg_scan('/tmp/default_storage_173276977134208/tables/00000000-0000-0000-0000-00000ee128fc/metadata/00015-49f45d85-a345-4fc3-92f1-1e0c8b1950ef.gz.metadata.json');

crash_report.log

@shanielh
Copy link
Author

shanielh commented Dec 4, 2024

I had two errors after resolving this one (I forgot to set METADATA_COMPRESSION_CODEC='gzip'):

  1. No supports for upserts (positional / equality deletes in Iceberg Spec V2) - Can't read tables with updates/deletes #67, Support Equality based deletes #5
  2. Tables on local file system didn't work (Support for the file:// prefix #38), It seems like the fix is to modify FileSystem::ExpandPath to :
string FileSystem::ExpandPath(const string &path, optional_ptr<FileOpener> opener) {
	auto file_path = path;
	auto file_prefix = "file://";
	if (StringUtil::StartsWith(path, file_prefix)) {
		file_path = path.substr(strlen(file_prefix));
	}

	if (file_path.empty()) {
		return file_path;
	}
	if (file_path[0] == '~') {
		return GetHomeDirectory(opener) + file_path.substr(1);
	}
	return file_path;
}

I'm closing this issue as it's no longer needed since there are other issues / PRs.

@shanielh shanielh closed this as completed Dec 4, 2024
@jasonf20
Copy link

jasonf20 commented Dec 8, 2024

This is a real issue as it crashes instead of throwing and indicative error (or automatically handling compression)

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

No branches or pull requests

2 participants