Sharang Gupta created IOTDB-6360:
------------------------------------
Summary: CREATE TIMESERIES rejects lowercase
datatype/encoding/compressor under the Turkish locale
Key: IOTDB-6360
URL: https://issues.apache.org/jira/browse/IOTDB-6360
Project: Apache IoTDB
Issue Type: Bug
Reporter: Sharang Gupta
ASTVisitor parses the CREATE/ALTER TIMESERIES datatype/encoding/compressor name
with bare String.toUpperCase() before
TSDataType/TSEncoding/CompressionType.valueOf(). Under the Turkish/Azeri
locale, "int32".toUpperCase() = "INT32" with a dotted I, so CREATE TIMESERIES
root.sg.d1.s1 WITH DATATYPE=int32,ENCODING=plain is rejected as "unsupported
data type", although lowercase type names are case-insensitive by design and
work under en-US. Affects INT32/INT64/TIMESTAMP/STRING,
PLAIN/DICTIONARY/ZIGZAG/CHIMP/SPRINTZ/TS_2DIFF, GZIP. v2.0.11 and master;
tree-model ASTVisitor only (the table-model engine already uses
Locale.ENGLISH). Fix: toUpperCase(Locale.ENGLISH) at the ~13 value sites.
Runner-up: AggregationDescriptor.getAggregationTypeByFuncName (uncaught
valueOf) - same root cause.
The table-model engine already folds these names with Locale.ENGLISH, so a
production datanode under a Turkish OS locale rejects valid lowercase DDL that
the table model accepts. I'm happy to open a PR applying the same
Locale.ENGLISH fix to the tree-model ASTVisitor if this is something you'd take.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)