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

Does not work with a Parquet file on an HTTPs server #2561

Closed
alexey-milovidov opened this issue Feb 1, 2024 · 0 comments · Fixed by #2565
Closed

Does not work with a Parquet file on an HTTPs server #2561

alexey-milovidov opened this issue Feb 1, 2024 · 0 comments · Fixed by #2565
Assignees
Labels
bug 🐛 Something isn't working

Comments

@alexey-milovidov
Copy link

alexey-milovidov commented Feb 1, 2024

Description

Successfully downloaded the GlareDB binary.
You can run it as:
    > ./glaredb
ubuntu@ip-172-31-38-111:~$ ./glaredb
GlareDB (v0.8.3)
Type \help for help.
> \help
\help           Show this help text
\mode MODE      Set the output mode [table, json, ndjson, csv]
\max-rows NUM   Max number of rows to display
\max-width NUM  Maximum width of the output table to display. Defaults to terminal size.
\open PATH      Open a database at the given path
\timing         Toggle query execution runtime display
\quit           Quit this session
> SELECT COUNT(*) FROM 'https://clickhouse-public-datasets.s3.eu-central-1.amazonaws.com/hits_compatible/athena_partitioned/hits_{0..99}.parquet';
Error: External error: Error during planning: Unexpected status code '404 Not Found' for url: 'https://clickhouse-public-datasets.s3.eu-central-1.amazonaws.com/hits_compatible/athena_partitioned/hits_%7B0..99%7D.parquet'
> SELECT COUNT(*) FROM 'https://clickhouse-public-datasets.s3.eu-central-1.amazonaws.com/hits_compatible/athena/hits.parquet';
Error: External error: Execution error: file size of 0 is less than footer
> 
ubuntu@ip-172-31-38-111:~$ curl -I https://clickhouse-public-datasets.s3.eu-central-1.amazonaws.com/hits_compatible/athena/hits.parquet
HTTP/1.1 200 OK
x-amz-id-2: rQTq/S1trym26TzeNCTii4QU80RuvPQcST4lEVnu4gmTet9aLbGUunMSRAsxeug/kSCPR9HUDOc=
x-amz-request-id: PPB9PJMPEFEK8H20
Date: Thu, 01 Feb 2024 23:46:16 GMT
Last-Modified: Sun, 03 Jul 2022 03:31:13 GMT
ETag: "359976a01ddb98f2363d076a276acb24-1762"
Accept-Ranges: bytes
Content-Type: binary/octet-stream
Server: AmazonS3
Content-Length: 14779976446
@alexey-milovidov alexey-milovidov added the bug 🐛 Something isn't working label Feb 1, 2024
universalmind303 added a commit that referenced this issue Feb 2, 2024
reqwest's `content_length` method apparantly doesnt check for the casing
of "Content-Length". This seems like a bug in reqwest to me.

seanmonstar/reqwest#843


```rust

#[tokio::main]
async fn main() {
    let client = reqwest::Client::new();
    let head_res = client.head("https://clickhouse-public-datasets.s3.eu-central-1.amazonaws.com/hits_compatible/athena/hits.parquet").send().await.unwrap();
    let content_length = head_res.content_length();
    assert_eq!(content_length, Some(14779976446))
}

```

closes #2561
@universalmind303 universalmind303 self-assigned this Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants