zhuqi-lucas commented on issue #16277: URL: https://github.com/apache/datafusion/issues/16277#issuecomment-2948465210
Good question @xudong963 . I agree that we can map both CHAR and VARCHAR to Utf8View. In DataFusion, both types are ultimately represented as Arrow string arrays, so using Utf8View avoids a full copy for either one. The only semantic difference is that, per SQL standards, CHAR(n) is fixed-length (right-padded with spaces or truncated to exactly n characters) while VARCHAR(n) is variable length (0–n characters). I am not sure if it has some issues about the mapping for CHAR(n), otherwise, treating both CHAR and VARCHAR as Utf8View in the planner/executor is fine and incurs no extra runtime cost. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org