You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by mohammadshahidkhan <gi...@git.apache.org> on 2017/08/16 09:47:37 UTC

[GitHub] carbondata pull request #1126: [CARBONDATA-1258] CarbonData should not allow...

Github user mohammadshahidkhan commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1126#discussion_r133404888
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/keygenerator/directdictionary/timestamp/DateDirectDictionaryGenerator.java ---
    @@ -154,6 +162,12 @@ private int generateDirectSurrogateKeyForNonTimestampType(String memberStr) {
       }
     
       private int generateKey(long timeValue) {
    +    if (timeValue < MIN_VALUE || timeValue > MAX_VALUE) {
    +      if (LOGGER.isDebugEnabled()) {
    +        LOGGER.debug("Value for date type column is not in valid range. Value considered as null.");
    +      }
    +      return 1;
    --- End diff --
    
    if the value is not in defined range then it will be store as null, if bad records action is FORCE.
    For null value dictionary key is 1.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---