You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Hans Zeller (JIRA)" <ji...@apache.org> on 2016/12/15 04:33:58 UTC
[jira] [Commented] (TRAFODION-2399) Syntax error on a string with
double charset qualifier on load from salted table
[ https://issues.apache.org/jira/browse/TRAFODION-2399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15750355#comment-15750355 ]
Hans Zeller commented on TRAFODION-2399:
----------------------------------------
The problem is that two methods add an _ISO88591 prefix to a string literal: CharType::createSQLLiteral() and ConstValue::getConstStr().
I'm a bit surprised that we don't hit this problem more often. My planned fix is to add a check in ConstValue::getConstStr() not to add a charset specifier if one is already there.
> Syntax error on a string with double charset qualifier on load from salted table
> --------------------------------------------------------------------------------
>
> Key: TRAFODION-2399
> URL: https://issues.apache.org/jira/browse/TRAFODION-2399
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmp
> Affects Versions: 2.0-incubating
> Environment: any
> Reporter: Hans Zeller
> Assignee: Hans Zeller
>
> This problem was reported by Eric Owhadi.
> Eric saw this error message when doing a load that had a salted table as a source and that was using a selection predicate in the source select:
> {noformat}
> *** ERROR[3127] An invalid character was found in identifier _ISO88591_ISO88591.
> *** ERROR[15001] A syntax error occurred at or before:
> CAST ( _ISO88591_ISO88591'' AS CHAR(1) CHARACTER SET ISO88591 COLLATE DEFAULT)
> ^ (11 characters from start of SQL statement)
> *** ERROR[2235] Compiler Internal Error: An unknown error, originated from file ../optimizer/EncodedKeyValue.cpp at line 223.
> {noformat}
> Here is a simple test case to reproduce the issue:
> {noformat}
> drop table summarized_items;
> CREATE TABLE summarized_items
> (has_item_list CHAR(1) NOT NULL,
> item_type CHAR(1) NOT NULL,
> PRIMARY KEY (has_item_list,
> item_type))
> SALT USING 2 PARTITIONS ON
> (item_type)
> ;
> drop table summarized_items2;
> CREATE TABLE summarized_items2
> (
> item_type CHAR(1) NOT NULL)
> ;
> cqd COMP_BOOL_226 'on';
> prepare s from
> LOAD TRANSFORM INTO summarized_items2 select item_type from summarized_items where has_item_list = 'F';
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)