apache / apache/arrow

[C++][Arrow Flight SQL ODBC] Support `SQL_DESC_DATETIME_INTERVAL_PRECISION` attribute

Open
#47,869 0 comments 0 reactions 0 assignees View on GitHub
Component: C++ Component: FlightRPC Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

Implement function in `ResultSetMetadata` class to return a value for `datetime_interval_precision` field based on the server's implementation of the interval type. See https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlsetdescfield-function?view=sql-server-ver17 for the appropriate values for `SQL_DESC_DATETIME_INTERVAL_PRECISION` field. This field is only applicable to SQL_INTERVAL data type.

> When SQL_DESC_DATETIME_INTERVAL_CODE is set to an interval data type, SQL_DESC_DATETIME_INTERVAL_PRECISION is set to 2 (the default interval leading precision). When the interval has a seconds component, SQL_DESC_PRECISION is set to 6 (the default interval seconds precision).

Parent issue: https://github.com/apache/arrow/issues/30622

### Component(s)

FlightRPC, C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.