Skip to content

Conversation

@jackfischer
Copy link
Contributor

Made sure the test was real this time and actually fails and succeeds as expected.

Two issues fixed:

  1. Added 'date_trunc' and 'date_part' to funcs_with_text_args so their text precision argument ('month', 'year', etc.) is correctly typed.

  2. Fixed remap_arguments in pg_ext.pyx to use extra_blobs() instead of variables(). The variables() method returns a deduplicated dict, but when the same literal appears multiple times (e.g., DATE_TRUNC in both SELECT and GROUP BY), we need all occurrences. This matches the pattern used in args_ser.pyx.

Closes #9118

Two issues fixed:

1. Added 'date_trunc' and 'date_part' to funcs_with_text_args so their
   text precision argument ('month', 'year', etc.) is correctly typed.

2. Fixed remap_arguments in pg_ext.pyx to use extra_blobs() instead of
   variables(). The variables() method returns a deduplicated dict, but
   when the same literal appears multiple times (e.g., DATE_TRUNC in both
   SELECT and GROUP BY), we need all occurrences. This matches the pattern
   used in args_ser.pyx.

Closes geldata#9118
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

Successfully merging this pull request may close these issues.

SQL DATE_TRUNC query ExecutionError / FATAL: list index out of range

1 participant