GitHub user arina-ielchiieva opened a pull request: https://github.com/apache/drill/pull/706
DRILL-5039: NPE - CTAS PARTITION BY (<char-type-column>) 1. Moved varchar `newPartitionValue` functions to `NewValueFunctions` template: a. took advantage of code generation for varchar `newPartitionValue` functions; b. all `newPartitionValue` functions will be in one file. 2. Fixed logic for reassigning nullable varchar holders during `newPartitionValue` function execution (previously resulted in NPE if varchar partition column contained nulls). 3. Added `alltypes_optional.parquet` (each type contains at least one null value) in test resources and updated `alltypes_required.parquet` to have the same types as in `alltypes_optional.parquet`. 4. Added new unit test `testPartitionByForAllTypes` to cover all types and cases (with and without nulls) during CTAS with partitioning. 5. Updated `minMaxEmptyNonNullableInput` test to reflect changes in `alltypes_required.parquet`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/arina-ielchiieva/drill DRILL-5039 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/706.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #706 ---- commit 3521339a8a39dc8cef5b769ee8abce00e6a88ba7 Author: Arina Ielchiieva <arina.yelchiy...@gmail.com> Date: 2016-12-23T17:51:38Z DRILL-5039: NPE - CTAS PARTITION BY (<char-type-column>) ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---