Closed TCeason closed 1 week ago
cc @dantengsky
I found a similar open issue related to a "no file found" error when accessing a parquet file in a SQL logic test. The issue is documented here and suggests that the problem might be due to the inability to read parquet files without knowing their length, as the metadata is read from the end of the file [1].
To resolve the "no file found" error in the Databend SQL logic test for the MERGE
operation, ensure that the file path used in the test is correctly specified and that the file is properly written to the expected location. In the provided code, the file is written to the path "/tmp/test/merged"
. Verify that this path is correct and accessible in your test environment.
Here is the relevant part of the code that writes the parquet file:
let data = Bytes::from(buf);
let builder = Memory::default();
let path = "/tmp/test/merged";
let op = Operator::new(builder).unwrap().finish();
let blocking_op = op.blocking();
blocking_op.write(path, data).unwrap();
Ensure that the directory "/tmp/test/"
exists and is writable. If the directory does not exist, you may need to create it before running the test. Additionally, check for any errors during the file writing process that might indicate why the file is not being created.
Moreover, based on the provided test script, ensure that the stage and file format are correctly set up and that the parquet file is correctly copied into the stage. Here is the relevant part of the test script:
statement ok
drop stage if exists distributed_source_parquet;
statement ok
create stage distributed_source_parquet file_format = (type = parquet);
statement ok
remove @distributed_source_parquet;
statement ok
copy into @distributed_source_parquet from (select * from distributed_source_test);
Make sure that the distributed_source_parquet
stage is created and the parquet file is copied into it correctly. This setup is crucial for the MERGE
operation to find and use the parquet file [2][3].
To continue talking to Dosu, mention @dosu.
Summary
https://github.com/datafuselabs/databend/actions/runs/10861989837/job/30144676188?pr=16453