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

Float/real type cannot be read #133

Closed
OssiLehtinen opened this issue Jan 26, 2021 · 6 comments
Closed

Float/real type cannot be read #133

OssiLehtinen opened this issue Jan 26, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@OssiLehtinen
Copy link
Contributor

Hi Dyfan,

it appears that noctua doesn't know how to interpret a query result with the type 'real'.

For example:

res <- DBI::dbSendStatement(cona, "create table temp.realexample as (select cast(1 as real) as realcol)")
# Wait until table is created
dplyr::tbl(cona, dbplyr::in_schema("temp", "realexample"))

produces the error: "Error: Unknown shortcut: real"

Should AthenaToRDataType-function have mapping for 'real' included (instead of 'float')?

AthenaToRDataType.athena_data.table <-

AthenaToRDataType.athena_vroom <-

@DyfanJones
Copy link
Owner

Hi @OssiLehtinen,

You are quiet right, this is an oversight. As I didn't realise that Athena only uses float in DDL but real in SQL functions like select cast (https://docs.aws.amazon.com/athena/latest/ug/data-types.html).

@DyfanJones DyfanJones added the bug Something isn't working label Jan 26, 2021
@DyfanJones
Copy link
Owner

When float has been create in the tables ddl what does that column data type return as: float or real?

I could always just add real to the switch function to make sure noctua covers all bases :)

@DyfanJones
Copy link
Owner

@OssiLehtinen is there any other Data types that are missing? I am not a 100% sure if binary, map, array and struct can be simply added without some extra thinking it through.

Potentially cast them as strings for the file readrs and then parse them using jsonlite 🤔

@OssiLehtinen
Copy link
Contributor Author

When float has been create in the tables ddl what does that column data type return as: float or real?

I could always just add real to the switch function to make sure noctua covers all bases :)

I'm afk atm but I think it returns real. Will have to check, but probably only tomorrow.

@OssiLehtinen
Copy link
Contributor Author

@OssiLehtinen is there any other Data types that are missing? I am not a 100% sure if binary, map, array and struct can be simply added without some extra thinking it through.

Potentially cast them as strings for the file readrs and then parse them using jsonlite 🤔

Didn't bump into issues with other baisc types.

Arrays etc definitely don't work so I have been avoiding them. An interesting idea to read them in as strings and parse afterwards!

@DyfanJones
Copy link
Owner

I will raise another ticket around the array data type, as I might not be able to get it working :P

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

2 participants