Let Flink SQL PlannerExpressionParserImpl#FieldRefrence use Unicode as its default charset

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Let Flink SQL PlannerExpressionParserImpl#FieldRefrence use Unicode as its default charset

刘首维
Hi all,

  As the title tells, what I do want to do is let the `FieldRefrence` use Unicode as its default charset (or maybe as an optional  charset which can be configured).
According to the  `PlannerExpressionParserImpl`, currently FLINK uses JavaIdentifier as   `FieldRefrence`‘s default charset. But, from my perspective, it is not enough. Considering that user who uses ElasticSearch as sink,we all know that ES has A field called `@timestamp`, which JavaIdentifier cannot meet.

  So in my team, we just let `PlannerExpressionParserImpl#FieldRefrence` use Unicode as its default charset so that solves this kind of problem. (Plz refer to the issue I mentioned above )

In my Opinion, the change shall be for general purpose:
 Firstly, Mysql supports unicode as default field charset, see the field named `@@`, so shall we support unicode also?

  What’ s more,  my team really get a lot of benefits  from this change. I also believe that it can give other users more benefits without even any harm!
  Fortunately, the change supports fully forwards compatibility.Cuz Unicode is the superset of  JavaIdentifier. Only a few code change can achieve this goal.
  Looking forward for any opinion.
 
 btw, thanks to tison~



Best Regards
刘首维
Shoi Liu