fix: compare column meta one by one and add ut for metacmp flag#194
fix: compare column meta one by one and add ut for metacmp flag#194heni02 merged 2 commits intomatrixorigin:mainfrom
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
PR Type
Bug fix, Tests
Description
Refactored column metadata comparison to compare one column at a time
Extracted
stringAt()method for building individual column metadata stringsFixed special character handling in metadata comparison logic
Added comprehensive unit tests for
@metacmpflag parsing and behaviorDiagram Walkthrough
File Walkthrough
RSMetaData.java
Refactor metadata comparison to per-column logicsrc/main/java/io/mo/result/RSMetaData.java
equals()method to compare metadata column-by-columninstead of full strings
stringAt(int index)method to build individual columnmetadata strings
metadata comparison
fullString()method to reusestringAt()for consistencyScriptParserTest.java
Add comprehensive @metacmp flag parsing testssrc/test/java/io/mo/util/ScriptParserTest.java
testDocumentLevelMetacmpFlag()to verify document-level@metacmpflag parsing
testSQLLevelMetacmpFlag()to verify SQL-level@metacmpflagparsing
testMetacmpPriority()to validate SQL-level flags overridedocument-level
testMetacmpBooleanParsing()to test case-insensitive booleanvalue parsing
testInvalidMetacmpFormat()to verify invalid formats are safelyignored
testMixedMetacmpFlags()to test complex scenarios with mixedflag levels