Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICU BindAdapterData::Equals is missing #2834

Closed
hawkfish opened this issue Dec 23, 2021 · 0 comments
Closed

ICU BindAdapterData::Equals is missing #2834

hawkfish opened this issue Dec 23, 2021 · 0 comments

Comments

@hawkfish
Copy link
Contributor

hawkfish commented Dec 23, 2021

What happens?

When multiple ICU date part functions are invoked, the first one is executed for all of them

To Reproduce

require icu

SELECT MAX(EXTRACT(YEAR FROM ts))
	, MAX(EXTRACT(MONTH FROM ts))
	, MAX(EXTRACT(DAY FROM ts))
	, MAX(EXTRACT(DECADE FROM ts))
	, MAX(EXTRACT(CENTURY FROM ts))
FROM (SELECT '2021-12-22'::TIMESTAMPTZ) tbl(d);

This is because BoundFunctionExpression::Equals relies on comparing the FunctionData when the function itself is the same.

Environment (please complete the following information):

  • OS: OSX
  • DuckDB Version: 0.3.2 HEAD
  • DuckDB Client: Test Harness

Before Submitting

  • [X ] Have you tried this on the latest master branch?
  • Python: pip install duckdb --upgrade --pre
  • R: install.packages("https://github.com/duckdb/duckdb/releases/download/master-builds/duckdb_r_src.tar.gz", repos = NULL)
  • Other Platforms: You can find binaries here or compile from source.
  • [X ] Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
hawkfish pushed a commit to hawkfish/duckdb that referenced this issue Dec 23, 2021
Add Equals method to prevent aliasing of ICU part functions.
Mytherin added a commit that referenced this issue Dec 23, 2021
Issue #2834: ICU BindAdapterData::Equals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants