Create or Replace Temporary Type x as Enum not supported #13184
Alex-Monahan
started this conversation in
General
Replies: 1 comment
-
|
Thanks for filing, should be reasonably easy to add, but not a bug. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What happens?
Temporary types / temporary enums don't appear to be supported just yet.
I found a use case for this when creating an enum type to use as the columns to pivot outwards in a dynamic PIVOT (using the
querytable function). Sincequerycan only execute a single statement, I need to create the enum ahead of time. Without a temporary type, I need to do a fair bit of bookkeeping to ensure transactional safety. The syntax I end up having to use is:My ideal syntax would be:
(Note the
dynamic_aggregatesfunction uses thequerytable function together with apivotand refers to thecolumns_parameter_enum)To Reproduce
These do not work just yet:
All of the above return the same message:
This works:
OS:
MacOS
DuckDB Version:
v1.0.1-dev2074
DuckDB Client:
Python
Full Name:
Alex Monahan
Affiliation:
DuckDB Labs and MotherDuck
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a nightly build
Did you include all relevant data sets for reproducing the issue?
Not applicable - the reproduction does not require a data set
Did you include all code required to reproduce the issue?
Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?
Beta Was this translation helpful? Give feedback.
All reactions