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 kotlin warnings in destination CDK submodules #37481
fix kotlin warnings in destination CDK submodules #37481
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @stephane-airbyte and the rest of your teammates on Graphite |
6ee805a
to
fc7b7e9
Compare
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.
took a quick skim over this, didn't go into depth on e.g. the removed method params. Had a couple specific questions but lgtm otherwise
@@ -15,9 +15,9 @@ class JdbcInsertFlushFunction( | |||
override val optimalBatchSizeBytes: Long | |||
) : DestinationFlushFunction { | |||
@Throws(Exception::class) | |||
override fun flush(desc: StreamDescriptor, stream: Stream<PartialAirbyteMessage>) { | |||
override fun flush(decs: StreamDescriptor, stream: Stream<PartialAirbyteMessage>) { |
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.
is this to match super declaration? I'd prefer to modify the base class to use desc
, since presumably this is shorthand for "descriptor"
pair.name, | ||
FileUtils.byteCountToDisplaySize(writer.byteCount) | ||
) | ||
log.info { |
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.
log.info { | |
log.info {"Flushing buffer for stream ${pair.name} (${FileUtils.byteCountToDisplaySize(writer.byteCount)}) to staging"} |
not actually sure I understand what's written right now - why is there "${"..."}"
? (similar question for the other log.error call)
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.
} | ||
.map { statement: String -> | ||
.filter { statement: String? -> !statement.isNullOrEmpty() } | ||
.map internalMap@{ statement: String -> |
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.
what is internalMap?
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.
fc7b7e9
to
a393292
Compare
a393292
to
1696178
Compare
@@ -23,7 +23,7 @@ import org.apache.commons.csv.CSVPrinter | |||
abstract class JdbcSqlOperations : SqlOperations { | |||
protected val schemaSet: MutableSet<String?> = HashSet() | |||
|
|||
protected constructor() {} | |||
protected constructor() |
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.
Non-blocking question: curious what's the point of a no-arg no-op protected constructor in an abstract class?
csvPrinters[gcsFileName]!!.printRecord( | ||
override fun write(id: UUID?, recordMessage: AirbyteRecordMessage?, fileName: String?) { | ||
if (csvPrinters.containsKey(fileName)) { | ||
csvPrinters[fileName]!!.printRecord( |
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.
csvPrinters[fileName]?.let { ... }
when (schema) { | ||
when ( | ||
val schema: AirbyteType = | ||
AirbyteType.Companion.fromJsonSchema(stream.stream.jsonSchema) |
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.
Does the Companion
need to be referenced explicitly?
cleaning up kotlin warnings
cleaning up kotlin warnings