trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xwq <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #1167: [TRAFODION-2308]JDBC support insert ...
Date Fri, 07 Jul 2017 06:58:41 GMT
Github user xwq commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1167#discussion_r126080927
  
    --- Diff: core/sql/parser/sqlparser.y ---
    @@ -11826,11 +11827,40 @@ blob_optional_left_len_right: '(' NUMERIC_LITERAL_EXACT_NO_SCALE
optional_blob_u
             }
     
     /* type int64 */
    -optional_blob_unit :   TOK_K {$$ = 1024;}
    +optional_lob_unit :   TOK_K {$$ = 1024;}
                          | TOK_M {$$ = 1024*1024;}
                          | TOK_G {$$ = 1024*1024*1024;}
                          | empty {$$ = 1;}
     
    +clob_optional_left_len_right: '(' NUMERIC_LITERAL_EXACT_NO_SCALE optional_lob_unit ')'
    +        {
    +	  Int64 longIntVal = atoInt64($2->data());
    +	  if (longIntVal < 0)
    +	  {
    +	    // Error: Expected an unsigned integer
    +	    *SqlParser_Diags << DgSqlCode(-3017)
    +			     << DgString0(*$2);
    +	  }
    +	  longIntVal = longIntVal * $3;
    +
    +	  $$ = (Int64)longIntVal;
    +	  delete $2;
    +	}
    +
    +	| empty
    +	{
    +
    +	  if (CmpCommon::getDefault(TRAF_CLOB_AS_VARCHAR) == DF_ON)
    +	    {
    +	      $$ = (Int64)100000;
    +	    }
    +	  else
    +	    {
    +	      $$ = (Int64)CmpCommon::getDefaultNumeric(LOB_MAX_SIZE)*1024*1024;
    +
    +	    }
    +        }
    +
    --- End diff --
    
    I am not run TESTTOK2, thank you for running the extra tests. 


---
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.
---

Mime
View raw message