Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
priyanshi-yb committed Feb 26, 2025
1 parent 87682c5 commit 2007ee4
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,14 @@ public void processRecord(Record r){
columnValue = Long.valueOf(value);
sequenceMax.put(seqName, Math.max(sequenceMax.get(seqName), columnValue));
} catch (NumberFormatException e) {
//Skipping the sequences that are not on Integer columns
LOGGER.info("Skipping unsupported sequence with non-interger value: '{}'", seqName);
/*
Skipping the sequences that are on non-Integer columns
the case where Table has a text column and its default is generating a string which include the sequence nextval
e.g. CREATE TABLE test(user_id text DEFAULT 'USR' || LPAD(nextval('user_code_seq')::TEXT, 4, '0'), user_name text);
For the above table the row will have USR0001 column value for user_id column
and while converting this USR0001 to Long will error out with NumberFormatException as its not a number
*/
LOGGER.debug("Skipping unsupported sequence with non-interger value: '{}'", seqName);
}
}
}
Expand Down

0 comments on commit 2007ee4

Please sign in to comment.