Canner / wren-engine

🤖 The semantic engine for LLMs, bringing semantic context to AI agents. 🔥
https://getwren.ai/oss
Apache License 2.0
114 stars 25 forks source link

Allow to set default catalog and default schema when `transform_sql` #715

Closed goldmedal closed 2 weeks ago

goldmedal commented 1 month ago

Description

Currently, wren-core-rs recognizes a qualified table name to generate the corresponding model. The user needs to provide the full name of the model in the query, such as:

SELECT * FROM wren.public.orders

It would be more convenient if the user could simply query with the table name:

SELECT * FROM orders

Solution

We can modify the transform_sql API to apply the catalog and schema of MDL to the DataFusion SessionContext.

goldmedal commented 1 month ago

It is also related to the V3 validation API. https://github.com/Canner/wren-engine/blob/8449442a54a7953dee694bf5526f35448da23273/ibis-server/tests/routers/v3/connector/test_postgres.py#L311-L312

himanshu634 commented 1 month ago

@goldmedal Can you assign it to me?

goldmedal commented 1 month ago

Thanks @himanshu634. If you have any questions about it, feel free to ask me here or leave message.

himanshu634 commented 1 month ago

Hey @goldmedal , I want to understand the project. What module does what work?

goldmedal commented 3 weeks ago

Hey @goldmedal , I want to understand the project. What module does what work?

Hi @himanshu634, sorry for the delayed response; I had some personal matters to attend to.

This project is transitioning to a Rust implementation. There are many legacy Java modules you can ignore. You only need to focus on the following three modules:

I hope this information is helpful to you.

himanshu634 commented 3 weeks ago

Hey @goldmedal , I want to understand the project. What module does what work? Here's a grammatically corrected version:

Hi @himanshu634, sorry for the delayed response; I had some personal matters to attend to.

This project is transitioning to a Rust implementation. There are many legacy Java modules you can ignore. You only need to focus on the following three modules:

I hope this information is helpful to you.

Thanks.

goldmedal commented 2 weeks ago

Hi @himanshu634 Due to our schedule, I finished this work first. I found it may not be so simple for someone unfamiliar with our project and Rust. Maybe it's not a good first issue I think 🤔 Anyway, thank you for trying to contribute to wren-engine.