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

Table function "read_csv" does not support lateral join column parameters #11798

Closed
2 tasks done
debackerl opened this issue Apr 23, 2024 · 2 comments · Fixed by #11825
Closed
2 tasks done

Table function "read_csv" does not support lateral join column parameters #11798

debackerl opened this issue Apr 23, 2024 · 2 comments · Fixed by #11825

Comments

@debackerl
Copy link

What happens?

After upgrading from 0.10.1 to 0.10.2, I get the error "Table function "read_csv" does not support lateral join column parameters".

To Reproduce

The error comes from the second statement below. I have simplified it as much as possible.

db.execute("""--sql
CREATE OR REPLACE VIEW actions AS
SELECT *
FROM read_csv('nasdaq-data-link/SHARADAR/ACTIONS-2024-04-23.csv.zst', columns={'date': date, 'action': varchar, 'ticker': varchar, 'name': varchar, 'value': varchar, 'contraticker': varchar, 'contraname': varchar}, header=true, dateformat='%Y-%m-%d')
""")

db.execute("""--sql
CREATE OR REPLACE VIEW symbolchanges AS
SELECT *
FROM actions f
INNER JOIN actions t ON f.ticker = t.ticker
""")

OS:

Linux PopOS x64

DuckDB Version:

0.10.2 (via pip)

DuckDB Client:

Python 3.11.7

Full Name:

Laurent Debacker

Affiliation:

Personal research

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

No - I cannot share the data sets because they are confidential

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have
@duckdblabs-bot
Copy link
Collaborator

Thanks for opening this issue! Based on our automated check, it seems that your post contains some code but it does not use code blocks to format it.

Please double-check your post and revise it if necessary. To employ syntax highlighting, it's recommended to use code blocks with triple backticks, e.g.:

```sql
SELECT ...
```

If this is a false positive, feel free to disregard this comment.

@Mytherin
Copy link
Collaborator

Thanks for the report! I've pushed a fix in #11825.

Using string literals as input to columns would also resolve this issue, e.g.:

CREATE OR REPLACE VIEW actions AS
SELECT *
FROM read_csv('nasdaq-data-link/SHARADAR/ACTIONS-2024-04-23.csv.zst', columns={'date': 'date', 'action': 'varchar', 'ticker': 'varchar', 'name': 'varchar', 'value': 'varchar', 'contraticker': 'varchar', 'contraname': 'varchar'}, header=true, dateformat='%Y-%m-%d')

Mytherin added a commit that referenced this issue Apr 25, 2024
Fix #11798 - lateral join parameters should not be visible in views
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants