[
https://issues.apache.org/jira/browse/DRILL-5772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16207610#comment-16207610
]
ASF GitHub Bot commented on DRILL-5772:
---------------------------------------
Github user arina-ielchiieva commented on the issue:
https://github.com/apache/drill/pull/936
@paul-rogers
agree with you that charsets used in saffron properties should be defaulted
in Drill to `UTF-8` since Drill can read UTF-8 data and it's strange that it
would fail by default when Calcite will attempt to parse string into literal
used in query.
I have looked into Calcite code and there is no option to hard-code charset
values for Calcite but charset can be changed using properties.
There are two options of setting saffron properties:
1. as system property;
2. using `saffron.properties` file.
I don't really like passing them as `-D` when starting the drillbit 9since
there are at least two), so I am more inclined to use `saffron.properties`
file. Unfortunately, in Calcite code `saffron.properties` location is expected
to be working folder [1], i.e. the place where java process was started. I have
created Jira and pull request in Calcite to allow `saffron.properties` to be
present in classpath since it's more convenient [2]. I'll keep you updated on
Calcite community feedback.
[1]
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/util/SaffronProperties.java#L113
[2] https://issues.apache.org/jira/browse/CALCITE-2014
> Add unit tests to indicate how utf-8 support can be enabled / disabled in
> Drill
> -------------------------------------------------------------------------------
>
> Key: DRILL-5772
> URL: https://issues.apache.org/jira/browse/DRILL-5772
> Project: Apache Drill
> Issue Type: Task
> Affects Versions: 1.11.0
> Reporter: Arina Ielchiieva
> Assignee: Arina Ielchiieva
> Labels: doc-impacting
> Fix For: 1.12.0
>
>
> Add unit test to indicated how utf-8 support can be enabled in Drill.
> To select utf-8 data user needs to update system property
> {{saffron.default.charset}} to {{UTF-16LE}} before starting the drillbit.
> Calcite uses this property to get default charset, if it is not set then
> {{ISO-8859-1}} is used by default. Drill gets default charset from Calcite.
> This information should be also documented, probably in
> https://drill.apache.org/docs/data-type-conversion/.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)