apache / apache/datafusion-sqlparser-rs
AS Keyword added by default even if not specified on original SQL statement
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
Hi all,
I am writing you after @TylerBrinks suggested me to open a discussion on the issue mentioned in title.
Basically I am using the C# porting version of Rust one (thanks Tyler) using the Generic dialect in an Oracle
scenario. I know that is not the perfect usage but what happens is that when I parse a SQL statement that do not
have the AS clause specified the dialect automatically add it which causing Oracle error when trying to execute it.
I have tried to create a new dialect for Oracle but I didn't find a way (at least in the c# version) where to override
the default AS clause inserted. I proposed @TylerBrinks some changes to his porting code but he objected that was better to open a discussion here on this topic.
Please I am open to any solution like:
1- Write a new Oracle dialect class giving me the possibility to override the default AS clause
2- Remove default AS clause
Thanks in advance
Regards
Luigi
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Generic dialect parse for a statement without an AS clause, then trace where dialect-specific alias rendering is selected. Compare the parser's generated SQL with Oracle's requirement and determine whether an Oracle dialect or configurable AS behavior is appropriate. Done means the chosen behavior is covered and no unwanted AS clause is emitted for the Oracle case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100