正确的火花胶如何将bitint写入orc格式?

时间:2018-01-24 13:08:20

标签: java scala amazon-web-services apache-spark aws-glue

考虑一下代码

//read some csv table to dynamic frame like that:
val frame = glueContext
  .getCatalogSource(database = "my_database", tableName = "my_table")
  .getDynamicFrame()
//apply some mapping:
val mapped = frame.applyMapping(Seq("biging_col", "string", "biging_col", "bigint"))
//write to orc format:
glueContext.getSinkWithFormat(
  connectionType = "s3",
  options = JsonOptions(Map("path" -> "some_out_path", "partitionKeys" -> List("my_date"))),
format = "orc").writeDynamicFrame(mapped)

Everythings" works" (例如没有失败的错误),但是:

  1. Spark does not have任何BigInteger类型,只有DecimalType但是"写"精度为.0的积分并不好。 (顺便说一下,使用这种类型是否安全,而不是某种情况下不能转换为double类型?)
  2. orc还does not have任何BigInteger类型,即使没有Decimal类型。
  3. 那么当我必须用bigint写一些csv列到orc并使用spark和aws glue映射时,会发生什么样的魔力呢?预期的行为是什么?

0 个答案:

没有答案