WangGuangxin commented on PR #13756: URL: https://github.com/apache/gluten/pull/13756#issuecomment-7163139780
> @WangGuangxin Thanks for the fix. This looks a gap needs to be fixed for supporting TimestampNTZ type. > > [facebookincubator/velox#17116](https://github.com/facebookincubator/velox/pull/17116) tags schemas that Velox itself exports, and Velox imports an Arrow timestamp as `TIMESTAMP_UTC` when the field carries `velox.logical_timestamp=utc`. > > The JVM builds row-to-columnar schema in `SparkArrowUtil.toArrowField`, which writes `TimestampNTZType` as a timestamp with no timezone and no tag, so Velox imports it as `TIMESTAMP`. The Substrait plan maps NTZ to `TIMESTAMP_UTC`, so mixed batches fail `rowType_->equivalent` in the shuffle writer; other JVM-built schemas such as shuffle read and broadcast have the same gap. > > The suggested fix would be two JVM-only changes. First, `SparkArrowUtil.toArrowField` adds the `utc` tag to NTZ fields, including nested ones. Second, `ArrowUtil.toArrowSchema`, which `ColumnarBatches.load` uses, keeps the metadata Velox exported. > > Do you think this make sense? yes it's more reasonable, I'll try to refact it -- 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]
