You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose the dtype of a dynamic comparison's value on DynamicComparisonExpr #11550
DynamicComparisonExpr exposes its operator, its default and the current value (scalar()), but not the dtype of the dynamic value. scalar() returns None until a value is known, so code outside vortex-array cannot tell what dtype a dynamic comparison expects.
I ran into this in #11523. The DuckDB converter has to give a dynamic comparison the dtype of the zoned timestamp column it filters. It cannot check whether the comparison already has that dtype, so it rebuilds the comparison for every such column outside UTC, including the ones that table filters built with the right dtype.
Proposed solution
Add an accessor:
implDynamicComparisonExpr{/// The dtype of the dynamic value, whether or not the value is known yet.pubfndtype(&self) -> &DType}
I will open a pull request with it.
Additional context
Once this and #11523 are both in, the rewrite in vortex-duckdb/src/convert/time_zone.rs can skip a dynamic comparison whose dtype already matches its operand.
Activity