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

Clarification on Timestamp Precision in ADBC GetObjects Metadata #2496

Open
idosilverwater-vast opened this issue Feb 2, 2025 · 1 comment
Labels
Type: question Usage question

Comments

@idosilverwater-vast
Copy link

idosilverwater-vast commented Feb 2, 2025

I have been looking at how parameterized types are represented in the schema returned by AdbcConnectionGetObjects. I found that for DECIMAL(precision, scale), the precision and scale map to xdbc_column_size and xdbc_decimal_digits respectively. However, I wasn't able to determine where the time unit (s/ms/us/ns) of a TIMESTAMP type should be specified.

From my understanding, the column properties in COLUMN_SCHEMA are designed to mirror JDBC/ODBC metadata. However, I haven't found any standardized documentation that explicitly states how timestamp precision should be represented in this context.

My questions:

  • Is there a standard way to represent timestamp precision in the ADBC metadata schema?
  • If so, which field should hold this information?
  • Does this align with JDBC/ODBC metadata standards, and if so, where is it documented?

Any clarification on this would be greatly appreciated! Thanks in advance.

@idosilverwater-vast idosilverwater-vast added the Type: question Usage question label Feb 2, 2025
@lidavidm
Copy link
Member

lidavidm commented Feb 2, 2025

You can use GetTableSchema to get the Arrow schema directly, otherwise I don't think any driver currently populates any field for timestamp precision. IIRC, for JDBC/ODBC it ends up as the decimal precision or column size and we should be consistent with that when implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: question Usage question
Projects
None yet
Development

No branches or pull requests

2 participants