Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-48709][SQL] Fix varchar type resolution mismatch for DataSourc…
…eV2 CTAS ### What changes were proposed in this pull request? This PR fixes varchar type resolution mismatch for DataSourceV2 CTAS. For example: ```sql set spark.sql.storeAssignmentPolicy=LEGACY; CREATE TABLE testcat.ns.t1 (d1 string, d2 varchar(200)) USING parquet; CREATE TABLE testcat.ns.t2 USING foo as select * from testcat.ns.t1 ``` Error message: ``` org.apache.spark.sql.AnalysisException: LEGACY store assignment policy is disallowed in Spark data source V2. Please set the configuration spark.sql.storeAssignmentPolicy to other values. ``` ### Why are the changes needed? Avoid query failures. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Unit test. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #47082 from wangyum/SPARK-48709. Authored-by: Yuming Wang <yumwang@ebay.com> Signed-off-by: Kent Yao <yao@apache.org>
- Loading branch information