Since our Hive version is 1.2, please help to confirm
whether the NOT NULL function is supported for specific columns in HIVE table.
If supported, how to implement such function in the table DDL. Thanks!
At this time, NOT NULL constraints are not supported in Hive. The most recent release of Hive is 2.3.3. The version supported in the latest HDP release currently supports Hive 1.2.1 and Hive 2.1.0. As you noted, the JIRA addressing NOT NULL constraints is targeted for a 3.0 release.
There are some ways to work around this, such as creating a staging table, then using a COALESCE to default NULL values to something or a WHERE clause to filter out rows with NULL values. If you are using HDF/NiFi to load the tables, you could consider other options, such as routing filtered rows to an alternate table or queue to raise alerts.