-
Notifications
You must be signed in to change notification settings - Fork 28.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-47664][PYTHON][CONNECT] Validate the column name with cached s…
…chema ### What changes were proposed in this pull request? improve the column name validation, to try the best to avoid RPC. ### Why are the changes needed? existing validation contains two parts: 1. check whether the column name is in `self.columns` <- client side validation; 2. if step 1 fail, validate with additional RPC `df.select(...)` <- RPC; the client side validation is too simple, and this PR aims to improve it to cover more cases: 1. backticks: ``` '`a`' ``` 2. nested fields: ``` 'a.b.c' ``` ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? ci, added ut ### Was this patch authored or co-authored using generative AI tooling? no Closes #45788 from zhengruifeng/column_name_validate. Authored-by: Ruifeng Zheng <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
- Loading branch information
1 parent
cf02b1a
commit 968cba2
Showing
3 changed files
with
163 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters