Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-16 Thread via GitHub
alamb commented on PR #15135: URL: https://github.com/apache/datafusion/pull/15135#issuecomment-2727322360 Thank you @jonahgao and @Friede80 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the s

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-16 Thread via GitHub
alamb merged PR #15135: URL: https://github.com/apache/datafusion/pull/15135 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusi

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-14 Thread via GitHub
Friede80 commented on code in PR #15135: URL: https://github.com/apache/datafusion/pull/15135#discussion_r1996023999 ## datafusion/expr/src/logical_plan/builder.rs: ## @@ -776,8 +777,32 @@ impl LogicalPlanBuilder { &missing_cols, is_distinct, )

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-14 Thread via GitHub
jonahgao commented on code in PR #15135: URL: https://github.com/apache/datafusion/pull/15135#discussion_r1995225073 ## datafusion/expr/src/logical_plan/builder.rs: ## @@ -776,8 +777,32 @@ impl LogicalPlanBuilder { &missing_cols, is_distinct, )

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-13 Thread via GitHub
Friede80 commented on code in PR #15135: URL: https://github.com/apache/datafusion/pull/15135#discussion_r1994158077 ## datafusion/expr/src/logical_plan/plan.rs: ## @@ -2843,13 +2845,21 @@ impl Union { )? }; let nullable = f

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-13 Thread via GitHub
Friede80 commented on code in PR #15135: URL: https://github.com/apache/datafusion/pull/15135#discussion_r1994252846 ## datafusion/expr/src/logical_plan/plan.rs: ## @@ -2843,13 +2845,21 @@ impl Union { )? }; let nullable = f

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-13 Thread via GitHub
Friede80 commented on code in PR #15135: URL: https://github.com/apache/datafusion/pull/15135#discussion_r1994061012 ## datafusion/optimizer/src/analyzer/type_coercion.rs: ## @@ -930,7 +930,7 @@ fn coerce_case_expression(case: Case, schema: &DFSchema) -> Result { /// This meth

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-13 Thread via GitHub
Friede80 commented on code in PR #15135: URL: https://github.com/apache/datafusion/pull/15135#discussion_r1994071219 ## datafusion/optimizer/src/analyzer/type_coercion.rs: ## @@ -930,7 +930,7 @@ fn coerce_case_expression(case: Case, schema: &DFSchema) -> Result { /// This meth

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-13 Thread via GitHub
Friede80 commented on code in PR #15135: URL: https://github.com/apache/datafusion/pull/15135#discussion_r1994051405 ## datafusion/expr/src/logical_plan/builder.rs: ## @@ -776,8 +777,32 @@ impl LogicalPlanBuilder { &missing_cols, is_distinct, )

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-13 Thread via GitHub
jonahgao commented on code in PR #15135: URL: https://github.com/apache/datafusion/pull/15135#discussion_r1993723127 ## datafusion/optimizer/src/analyzer/type_coercion.rs: ## @@ -930,7 +930,7 @@ fn coerce_case_expression(case: Case, schema: &DFSchema) -> Result { /// This meth

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-13 Thread via GitHub
jonahgao commented on code in PR #15135: URL: https://github.com/apache/datafusion/pull/15135#discussion_r1993753803 ## datafusion/expr/src/logical_plan/plan.rs: ## @@ -2843,13 +2845,21 @@ impl Union { )? }; let nullable = f

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-13 Thread via GitHub
jonahgao commented on code in PR #15135: URL: https://github.com/apache/datafusion/pull/15135#discussion_r1993710892 ## datafusion/expr/src/logical_plan/plan.rs: ## @@ -2843,13 +2845,21 @@ impl Union { )? }; let nullable = f

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-13 Thread via GitHub
jonahgao commented on code in PR #15135: URL: https://github.com/apache/datafusion/pull/15135#discussion_r1993697044 ## datafusion/expr/src/logical_plan/builder.rs: ## @@ -776,8 +777,32 @@ impl LogicalPlanBuilder { &missing_cols, is_distinct, )

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-12 Thread via GitHub
alamb commented on PR #15135: URL: https://github.com/apache/datafusion/pull/15135#issuecomment-2719004026 > There seems to have been quite a few cracks at this particular situation: > > * [Join two tables with the same schema, then union throws `SchemaError(DuplicateUnqualifiedField

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-12 Thread via GitHub
Friede80 commented on PR #15135: URL: https://github.com/apache/datafusion/pull/15135#issuecomment-2718967054 There seems to have been quite a few cracks at this particular situation: https://github.com/apache/datafusion/issues/5410 https://github.com/apache/datafusion/pull/11082 htt

[PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-11 Thread via GitHub
Friede80 opened a new pull request, #15135: URL: https://github.com/apache/datafusion/pull/15135 ## Which issue does this PR close? - Closes #15134 ## Rationale for this change At the core, if a `Union` goes through the `TypeCoercion` analyzer twice, the schema can drop

Re: [PR] Fix invalid schema for unions in ViewTables [datafusion]

2025-03-10 Thread via GitHub
Friede80 commented on PR #15135: URL: https://github.com/apache/datafusion/pull/15135#issuecomment-271158 I'm not sure if there are still valid uses of `coerce_union_schema` given only the set of logical plans, but if we can't change the api of a public function, it would be easy enough