berryve commented on code in PR #9291:
URL: https://github.com/apache/arrow-rs/pull/9291#discussion_r2795095072
##########
arrow-avro/src/codec.rs:
##########
@@ -356,6 +356,56 @@ impl AvroDataType {
| Codec::DurationMicros
| Codec::DurationMillis
| Codec::DurationSeconds =>
AvroLiteral::Long(parse_json_i64(default_json, "long")?),
+ #[cfg(feature = "avro_custom_types")]
+ Codec::Int8 | Codec::Int16 => {
+ let i = parse_json_i64(default_json, "int")?;
+ if i < i32::MIN as i64 || i > i32::MAX as i64 {
+ return Err(ArrowError::SchemaError(format!(
+ "Default int {i} out of i32 range"
+ )));
+ }
+ AvroLiteral::Int(i as i32)
+ }
+ #[cfg(feature = "avro_custom_types")]
+ Codec::UInt8 | Codec::UInt16 => {
+ let i = parse_json_i64(default_json, "int")?;
+ if i < 0 || i > i32::MAX as i64 {
+ return Err(ArrowError::SchemaError(format!(
+ "Default unsigned int {i} out of range"
+ )));
+ }
+ AvroLiteral::Int(i as i32)
+ }
+ #[cfg(feature = "avro_custom_types")]
+ Codec::UInt32 | Codec::Date64 | Codec::TimeNanos |
Codec::TimestampSecs(_) => {
+ AvroLiteral::Long(parse_json_i64(default_json, "long")?)
Review Comment:
(agent) Intentional behavior. The user explicitly requested that
MAIN_APP_URL defaults to window.location.origin when the env var is not set,
for shared-domain deployments where both services share the same origin. In
different-domain deployments, the env var must be explicitly set.
--
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]