DRILL-6588: Make Sys tables of nullable datatypes
authorKunal Khatua <kkhatua@users.noreply.github.com>
Sat, 14 Jul 2018 17:43:17 +0000 (10:43 -0700)
committerSorabh Hamirwasia <sorabh@apache.org>
Sat, 14 Jul 2018 17:43:17 +0000 (10:43 -0700)
commitbd6f63ddf11a668d98e52444ba79c22494820996
tree0c90d8dc4f61449a42c481370e8d723351030a06
parente3534b6a9f1369a355d250a9e915ee40bca17444
DRILL-6588: Make Sys tables of nullable datatypes

This is to address the generic problem of NULL values being projected as a string because of all datatypes being non-nullable.
This patch only applies to tables backed by the PojoReader (in our case, System tables). Added NonNullable annotations wherever application in any of the System tables, along with a unit test that verifies both nullable and non-nullable datatypes exist in the system tables.

closes #1371
12 files changed:
exec/java-exec/src/main/java/org/apache/drill/exec/store/RecordDataType.java
exec/java-exec/src/main/java/org/apache/drill/exec/store/pojo/NonNullable.java [new file with mode: 0644]
exec/java-exec/src/main/java/org/apache/drill/exec/store/pojo/PojoDataType.java
exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/BitToUserConnectionIterator.java
exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/DrillbitIterator.java
exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/ExtendedOptionIterator.java
exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/MemoryIterator.java
exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/OptionIterator.java
exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/ProfileInfoIterator.java
exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/ProfileJsonIterator.java
exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/ThreadsIterator.java
exec/java-exec/src/test/java/org/apache/drill/exec/store/sys/TestSystemTable.java