Github user traflm commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/257#discussion_r49534386
--- Diff: core/sql/optimizer/SynthType.cpp ---
@@ -5207,6 +5207,18 @@ const NAType *Translate::synthesizeType()
err4106arg = SQLCHARSETSTRING_UTF8;
break;
+ case GBK_TO_UTF8:
+ if (translateSource->getCharSet() == CharInfo::GBK ||
translateSource->getCharSet() == CharInfo::UnknownCharSet )
+ charsetTarget = CharInfo::UTF8;
--- End diff --
I need to remove the 'unknowncharset' checking. It is wrong.
In the beginning, I assumed Trafodion will treat the column charset of hive
table as unknown, since it seems to me Hive doesn't have charset info in the
column definition. So I add this checking, but it turns out Trafodion will
treat Hive column charset as 'HIVE_DEFAULT_CHARSET', so it should never be
'unknown'. I will remove this checking, it is confusing and wrong assumption.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---