[fix](serde) fix ipv4/v6 serde functions for arrow, orc, parquet format (#34042)

this PR is from @sjyango work in #32326,
wants merge #32326 into master branch, but it's draft and not maintain long time. so have this new PR.
Co-authored-by: sjyango <sjyang2022@zju.edu.cn>
This commit is contained in:
zhangstar333
2024-05-07 13:58:32 +08:00
committed by yiguolei
parent 804586b342
commit 520774a24b
22 changed files with 934 additions and 762 deletions

View File

@ -309,9 +309,13 @@ public class OutFileClause {
case VARCHAR:
orcType = "varchar(" + dorisType.getLength() + ")";
break;
case IPV4:
orcType = "int";
break;
case LARGEINT:
case DATE:
case DATETIME:
case IPV6:
orcType = "string";
break;
case DECIMALV2:
@ -423,9 +427,13 @@ public class OutFileClause {
case VARCHAR:
checkOrcType(schema.second, "varchar", false, resultType.getPrimitiveType().toString());
break;
case IPV4:
checkOrcType(schema.second, "int", false, resultType.getPrimitiveType().toString());
break;
case LARGEINT:
case DATE:
case DATETIME:
case IPV6:
checkOrcType(schema.second, "string", true, resultType.getPrimitiveType().toString());
break;
case DECIMAL32: