@@ -318,6 +318,7 @@ object GlueApp {
318
318
case " decimal" => row.getDecimal(position)
319
319
case " tinyint" => row.getByte(position)
320
320
case " uuid" => row.getString(position)
321
+ case " blob" => s " 0 ${lit(row.getAs[Array [Byte ]](colName)).toString.toLowerCase.replaceAll(" '" ," " )}"
321
322
case _ => throw new CassandraTypeException (" Unrecognized data type" )
322
323
}
323
324
whereStmt.append(s " $colName= $v" )
@@ -408,19 +409,18 @@ object GlueApp {
408
409
tiles.foreach(tile => {
409
410
keyspacesConn.withSessionDo {
410
411
session => {
411
- var tailLoadStatus = " "
412
- var headLoadStatus = " "
413
412
val rsTail = session.execute(s " SELECT * FROM migration.ledger WHERE ks=' $srcKeyspaceName' and tbl=' $srcTableName' and tile= $tile and ver='tail' " ).one()
414
413
val rsHead = session.execute(s " SELECT * FROM migration.ledger WHERE ks=' $srcKeyspaceName' and tbl=' $srcTableName' and tile= $tile and ver='head' " ).one()
415
414
416
415
val tail = Option (rsTail)
417
416
val head = Option (rsHead)
418
-
419
- if ( ! tail .isEmpty) {
420
- tailLoadStatus = rsTail.getString( " load_status " )
417
+ val tailLoadStatus = tail match {
418
+ case t if ! t .isEmpty => rsTail.getString( " load_status " )
419
+ case _ => " "
421
420
}
422
- if (! head.isEmpty) {
423
- headLoadStatus = rsHead.getString(" load_status" )
421
+ val headLoadStatus = head match {
422
+ case h if ! h.isEmpty => rsHead.getString(" load_status" )
423
+ case _=> " "
424
424
}
425
425
426
426
logger.info(s " Processing $tile, head is $head, tail is $tail, head status is $headLoadStatus, tail status is $tailLoadStatus" )
0 commit comments