-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
fix: iceberg timestamp value handling #49807
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -2,7 +2,7 @@ data: | |||
connectorSubtype: file | |||
connectorType: destination | |||
definitionId: 37a928c1-2d5c-431a-a97d-ae236bd1ea0c | |||
dockerImageTag: 0.1.13 | |||
dockerImageTag: 0.1.14 | |||
dockerRepository: airbyte/destination-iceberg-v2 | |||
githubIssueLabel: destination-iceberg-v2 | |||
icon: s3.svg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: since we are bumping this, we should fix this icon reference :)
@@ -20,6 +20,9 @@ import org.apache.iceberg.data.GenericRecord | |||
import org.apache.iceberg.types.Type | |||
|
|||
class AirbyteValueToIcebergRecord { | |||
|
|||
private val timeStringUtility = TimeStringUtility() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are not going to let Micronaut manage/inject this, it may make sense to make it a Kotlin object instead of a class to make it a singleton. That would allow us to reference the methods in a static-like way.
import java.time.ZoneOffset | ||
import java.time.ZonedDateTime | ||
|
||
class TimeStringUtility { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re: my previous comment -- this seems like this could be converted to an object
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit about file location + code reuse, otherwise lgtm
import java.time.ZoneOffset | ||
import java.time.ZonedDateTime | ||
|
||
object TimeStringUtility { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this class could probably live in core? and then TimeStringToInteger could use these functions
something might still be busted here? I tried enabling and the connector crashes on some timestamp value:
|
|
Issue : https://github.com/airbytehq/airbyte-internal-issues/issues/11037