Skip to content

dbDataType might have an issue with integer64 class in data.frames #277

@jd4ds

Description

@jd4ds

Hey there,
i might have encountered a small issue with the evaluation of integer64 objects in data.frames to determine their SQL datatype.
It seems everything works fine if integer64 objects get evaluated as a single vector, but as soon as they are part of a data.frame it seems there is problem in finding the correct method.

Here is a reprex;

DBI::dbDataType(
  dbObj = RMariaDB:::mariadb_default(),
  bit64::as.integer64(1L)
)
#> [1] "BIGINT"


DBI::dbDataType(
  dbObj = RMariaDB:::mariadb_default(),
  data.frame(column = 1L)
)
#> column 
#>  "INT"

DBI::dbDataType(
  dbObj = RMariaDB:::mariadb_default(),
  data.frame(column = bit64::as.integer64(1L))
)
#> Error in (function (classes, fdef, mtable) : unable to find an inherited method for function 'dbiDataType' for signature '"integer64"'

Created on 2022-07-22 by the reprex package (v2.0.1)

Thanks!
Janis

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions