File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
core/src/main/java/com/dtstack/flink/sql/table Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public abstract class AbsSourceParser extends AbsTableParser {
4242
4343 private static Pattern virtualFieldKeyPattern = Pattern .compile ("(?i)^(\\ S+\\ ([^\\ )]+\\ ))\\ s+AS\\ s+(\\ w+)$" );
4444 private static Pattern waterMarkKeyPattern = Pattern .compile ("(?i)^\\ s*WATERMARK\\ s+FOR\\ s+(\\ S+)\\ s+AS\\ s+withOffset\\ (\\ s*(\\ S+)\\ s*,\\ s*(\\ d+)\\ s*\\ )$" );
45- private static Pattern notNullKeyPattern = Pattern .compile ("(?i)(\\ w+)\\ s+(\\ w+)( \\ s+NOT\\ s+NULL) ?$" );
45+ private static Pattern notNullKeyPattern = Pattern .compile ("(?i)(\\ w+)\\ s+(\\ w+)\\ s+NOT\\ s+NULL?$" );
4646
4747 static {
4848 keyPatternMap .put (VIRTUAL_KEY , virtualFieldKeyPattern );
@@ -74,9 +74,8 @@ static void dealNotNull(Matcher matcher, TableInfo tableInfo) {
7474 String fieldName = matcher .group (1 );
7575 String fieldType = matcher .group (2 );
7676 Class fieldClass = ClassUtil .stringConvertClass (fieldType );
77- boolean notNull = matcher .group (3 ) != null ;
7877 TableInfo .FieldExtraInfo fieldExtraInfo = new TableInfo .FieldExtraInfo ();
79- fieldExtraInfo .setNotNull (notNull );
78+ fieldExtraInfo .setNotNull (true );
8079
8180 tableInfo .addPhysicalMappings (fieldName , fieldName );
8281 tableInfo .addField (fieldName );
You can’t perform that action at this time.
0 commit comments