Skip to content

Commit

Permalink
Fix validation of queries with Sample
Browse files Browse the repository at this point in the history
  • Loading branch information
thorfour committed May 30, 2024
1 parent 05c806b commit bd300cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions query/logicalplan/logicalplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ func (plan *LogicalPlan) DataTypeForExpr(expr Expr) (arrow.DataType, error) {
return nil, fmt.Errorf("data type for expr %v within Distinct: %w", expr, err)
}

return t, nil
case plan.Sample != nil:
t, err := expr.DataType(plan.Input)
if err != nil {
return nil, fmt.Errorf("data type for expr %v within Sample: %w", expr, err)
}

return t, nil
default:
return nil, fmt.Errorf("unknown logical plan")
Expand Down

0 comments on commit bd300cd

Please sign in to comment.