@@ -38,9 +38,7 @@ public abstract class AbsSourceParser extends AbsTableParser {
3838 private static final String VIRTUAL_KEY = "virtualFieldKey" ;
3939 private static final String WATERMARK_KEY = "waterMarkKey" ;
4040 private static final String NOTNULL_KEY = "notNullKey" ;
41- private static final String NEST_JSON_FIELD_KEY = "nestFieldKey" ;
4241
43- private static Pattern nestJsonFieldKeyPattern = Pattern .compile ("(?i)((@*\\ S+\\ .)*\\ S+)\\ s+(\\ w+)\\ s+AS\\ s+(\\ w+)(\\ s+NOT\\ s+NULL)?$" );
4442 private static Pattern virtualFieldKeyPattern = Pattern .compile ("(?i)^(\\ S+\\ ([^\\ )]+\\ ))\\ s+AS\\ s+(\\ w+)$" );
4543 private static Pattern waterMarkKeyPattern = Pattern .compile ("(?i)^\\ s*WATERMARK\\ s+FOR\\ s+(\\ S+)\\ s+AS\\ s+withOffset\\ (\\ s*(\\ S+)\\ s*,\\ s*(\\ d+)\\ s*\\ )$" );
4644 private static Pattern notNullKeyPattern = Pattern .compile ("(?i)^(\\ w+)\\ s+(\\ w+)\\ s+NOT\\ s+NULL?$" );
@@ -49,7 +47,6 @@ public AbsSourceParser() {
4947 addParserHandler (VIRTUAL_KEY , virtualFieldKeyPattern , this ::dealVirtualField );
5048 addParserHandler (WATERMARK_KEY , waterMarkKeyPattern , this ::dealWaterMark );
5149 addParserHandler (NOTNULL_KEY , notNullKeyPattern , this ::dealNotNull );
52- addParserHandler (NEST_JSON_FIELD_KEY , nestJsonFieldKeyPattern , this ::dealNestField );
5350 }
5451
5552 protected void dealVirtualField (Matcher matcher , TableInfo tableInfo ){
@@ -82,24 +79,4 @@ protected void dealNotNull(Matcher matcher, TableInfo tableInfo) {
8279 tableInfo .addFieldExtraInfo (fieldExtraInfo );
8380 }
8481
85- /**
86- * add parser for alias field
87- * @param matcher
88- * @param tableInfo
89- */
90- protected void dealNestField (Matcher matcher , TableInfo tableInfo ) {
91- String physicalField = matcher .group (1 );
92- String fieldType = matcher .group (3 );
93- String mappingField = matcher .group (4 );
94- Class fieldClass = dbTypeConvertToJavaType (fieldType );
95- boolean notNull = matcher .group (5 ) != null ;
96- TableInfo .FieldExtraInfo fieldExtraInfo = new TableInfo .FieldExtraInfo ();
97- fieldExtraInfo .setNotNull (notNull );
98-
99- tableInfo .addPhysicalMappings (mappingField , physicalField );
100- tableInfo .addField (mappingField );
101- tableInfo .addFieldClass (fieldClass );
102- tableInfo .addFieldType (fieldType );
103- tableInfo .addFieldExtraInfo (fieldExtraInfo );
104- }
10582}
0 commit comments