JdbcIO Microsoft Sql Types are not supported
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
While working with JdbcIO Sql Server data store, I encountered an issue where a data type DATETIMEOFFSET was not supported when reading data as Beam Row. The Beam field converter only looks for JdbcType and ignores the microsoft.sql.Types which makes is impossible for genuine data type to be processed. The list of non supported types are as follows:
- microsoft.sql.Types.SMALLDATETIME // -150 represents TSQL smalldatetime type
- microsoft.sql.Types.DATETIME // -151 represents TSQL datetime type
- microsoft.sql.Types.DATETIMEOFFSET // -155 represents TSQL Datetimeoffset type
All above types should be treated as if they are TIMESTAMP.
Imported from Jira [BEAM-12837](https://issues.apache.org/jira/browse/BEAM-12837). Original Jira may contain additional context.
Reported by: rdahal.
Contributor guide
Research direction
Start by locating JdbcIO's Beam Row field converter and checking how it maps JDBC types to Beam fields. Reproduce the SQL Server DATETIMEOFFSET case, then verify that microsoft.sql.Types.SMALLDATETIME, DATETIME, and DATETIMEOFFSET are handled as TIMESTAMP and that Beam Row reading succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100