rubenada commented on code in PR #6523: URL: https://github.com/apache/hive/pull/6523#discussion_r3785643292
########## ql/src/main/resources/saffron.properties: ########## @@ -0,0 +1,22 @@ +# ----------------------------------------------------------------------------- +# Calcite JVM-wide defaults for Hive. +# +# This file is read by org.apache.calcite.config.CalciteSystemProperty's +# static initializer at class-load time. Setting properties here rather +# than via System.setProperty() eliminates a potential class-load-order race. +# Command-line JVM flags (-Dcalcite.foo=bar) still override this file; +# see CalciteSystemProperty#loadProperties for the merge order. +# ----------------------------------------------------------------------------- + +# Prevent Calcite from normalizing RexNode digests. Hive relies on the +# un-normalized form for plan output stability. +calcite.enable.rexnode.digest.normalize = false + +# Default charset definition: matches Hive's HiveTypeFactory#getDefaultCharset. +# Value is little-endian: this matches +# org.apache.calcite.util.ConversionUtil#NATIVE_UTF16_CHARSET_NAME on +# every architecture Hive is deployed on in practice (x86, x86_64, +# aarch64 in default mode). On a hypothetical big-endian JVM, override with +# -Dcalcite.default.charset=UTF-16BE -Dcalcite.default.nationalcharset=UTF-16BE Review Comment: Users would need to change this property only on big-endian systems (which I guess it would be quite rare). AFAIK this should only impact plan's verbosity. So far Hive was running with the default DEFAULT_CHARSET ISO-8859-1, and there was no problem (apart from literals showing the actual charset, since it was not the default one). We used `ConversionUtil#NATIVE_UTF16_CHARSET_NAME` on the initial approach (setting system properties somewhere "on initialization"), but that was too flaky and hacky, see https://github.com/apache/hive/pull/6523#discussion_r3595829641 https://github.com/apache/hive/pull/6523#discussion_r3596809250 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
