@@ -40,10 +40,15 @@ interface KnownType {
4040
4141 KnownTypes () {
4242 add (new StringType (), String .class , char [].class , CharSequence .class );
43- add (new BoolType (), boolean .class , Boolean .class );
44- add (new IntegerType (), int .class , Integer .class );
45- add (new LongType (), long .class , Long .class );
46- add (new NumberType (), double .class , Double .class , float .class , Float .class , BigDecimal .class , BigInteger .class );
43+ add (new BoolType (), boolean .class );
44+ add (new BooleanType (), Boolean .class );
45+ add (new IntType (), int .class );
46+ add (new IntegerType (), Integer .class );
47+ add (new PLongType (), long .class );
48+ add (new LongType (), Long .class );
49+
50+ add (new PNumberType (), double .class , float .class );
51+ add (new NumberType (), Double .class , Float .class , BigDecimal .class , BigInteger .class );
4752 add (new DateType (), LocalDate .class , java .sql .Date .class );
4853 add (new DateTimeType (), Instant .class , OffsetDateTime .class , ZonedDateTime .class , Timestamp .class , java .util .Date .class , LocalDateTime .class );
4954
@@ -82,26 +87,54 @@ public Schema<?> createSchema() {
8287 }
8388
8489 private class BoolType implements KnownType {
90+ @ Override
91+ public Schema <?> createSchema () {
92+ return new BooleanSchema ().nullable (Boolean .FALSE );
93+ }
94+ }
95+
96+ private class BooleanType implements KnownType {
8597 @ Override
8698 public Schema <?> createSchema () {
8799 return new BooleanSchema ();
88100 }
89101 }
90102
103+ private class IntType implements KnownType {
104+ @ Override
105+ public Schema <?> createSchema () {
106+ return new IntegerSchema ().nullable (Boolean .FALSE );
107+ }
108+ }
109+
91110 private class IntegerType implements KnownType {
92111 @ Override
93112 public Schema <?> createSchema () {
94113 return new IntegerSchema ();
95114 }
96115 }
97116
117+ private class PLongType implements KnownType {
118+ @ Override
119+ public Schema <?> createSchema () {
120+ return new IntegerSchema ().format ("int64" ).nullable (Boolean .FALSE );
121+ }
122+ }
123+
98124 private class LongType implements KnownType {
99125 @ Override
100126 public Schema <?> createSchema () {
101127 return new IntegerSchema ().format ("int64" );
102128 }
103129 }
104130
131+ private class PNumberType implements KnownType {
132+ @ Override
133+ public Schema <?> createSchema () {
134+ return new NumberSchema ().nullable (Boolean .FALSE );
135+ }
136+ }
137+
105138 private class NumberType implements KnownType {
106139 @ Override
107140 public Schema <?> createSchema () {
0 commit comments