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

Support for different data_types SQLiteResult.data_collections_by_output_name #568

Open
marctavenier opened this issue Aug 25, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@marctavenier
Copy link

Hi,

When parsing a list with outputs to SQLiteResult.data_collections_by_output_name like this;
["Zone Mean Air Temperature", "Zone Air Relative Humidity"]
it returns the data collections, but the RH data collections have Temperature as their data_type instead of Fraction. It seems the data_type part of the header is of the first item is duplicated to all other items.

Fyi: when setting the _output_names to list access on the HB Read Custom Result Grasshopper component the same issue appears.

Kind regards,
Marc

@mostaphaRoudsari mostaphaRoudsari added the bug Something isn't working label Aug 25, 2022
@chriswmackey
Copy link
Member

Hey @marctavenier ,

This is kinda by design since the SQLite queries get a lot simpler and faster when I know that I'm always dealing with the same data type and units for all of the requested collections. Also, I designed the Grasshopper components such that this is always the case and people won't get cases of incorrect data types for the data collection.

Would you be alright with making two separate calls to the SQLiteResult.data_collections_by_output_name for your case here where you need two different data types? Or do you really need a method that checks the data type for each of the collections?

@marctavenier
Copy link
Author

Hi @chriswmackey,

I indeed made two separate calls for the different data types to solve the issue for now.

If it's by design to make it faster then perhaps it's good to mention this somewhere or somehow throw a warning when 2 data types are input, if you can detect that at all. Because right now it's unexpected behavior at the least, given the output is wrong without mentioning so. But I'm curious to your opinion on this.

Perhaps the HB Read Custom Result Grasshopper component would get a significant speed improvement when accessing the entire list? I haven't tested this but I can imagine so given the overhead reduces on setting up a new GHPython cycle for each item in a list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants