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

COPY from Parquet seems to keep the Parquet file open (so the file cannot be deleted) #100

Open
2 tasks done
pronzato opened this issue Nov 17, 2024 · 1 comment
Open
2 tasks done

Comments

@pronzato
Copy link

What happens?

After copying a Parquet file into a MySQL table, the Parquet file seems to be locked and therefore cannot be deleted until the process is killed. We use tmp Parquet files to bridge data from 1 system into MySQL so once we've ingested the Parquet file into MySQL we need to delete it.

To Reproduce

CALL mysql_execute('mysqldb', 'CREATE TABLE t1 (i INTEGER);');
COPY mysqldb.t1 FROM '/tmp/t1/data.parquet'

File f = new File("/tmp/t1/data.parquet");
boolean deleted = f.delete();
System.out.println("deleted = " + deleted);

OS:

Windows

MySQL Version:

8.1

DuckDB Version:

1.1.1

DuckDB Client:

Java

Full Name:

Gianni Pronzato

Affiliation:

pronzato

Have you tried this on the latest main branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree
@pronzato
Copy link
Author

Same happens if you try:
INSERT INTO mysqldb.t1 FROM read_parquet('/tmp/t1/data.parquet');

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

1 participant