GithubHelp home page GithubHelp logo

Comments (3)

Zouxxyy avatar Zouxxyy commented on June 16, 2024

I haven't reproduced it. Can you provide more detailed steps to reproduce it, is the tag written in spark?

from paimon.

eric666666 avatar eric666666 commented on June 16, 2024

I haven't reproduced it. Can you provide more detailed steps to reproduce it, is the tag written in spark?

I find the reson. The tag is created by flink at paimon 0.8 snapshot version which compliled early than 2024-04-15, But after 2024-04-15 Tag class add two new class field.
My tag file content:

{
  "version" : 3,
  "id" : 1,
  "schemaId" : 0,
  "baseManifestList" : "manifest-list-0dfb8ec3-0445-45f9-9c59-4d08e6443c43-0",
  "deltaManifestList" : "manifest-list-0dfb8ec3-0445-45f9-9c59-4d08e6443c43-1",
  "changelogManifestList" : "manifest-list-0dfb8ec3-0445-45f9-9c59-4d08e6443c43-2",
  "commitUser" : "59c08f33-b5de-4478-823c-5e681ee6e0b3",
  "commitIdentifier" : 1,
  "commitKind" : "APPEND",
  "timeMillis" : 1714379998639,
  "logOffsets" : { },
  "totalRecordCount" : 2531,
  "deltaRecordCount" : 2531,
  "changelogRecordCount" : 8227,
  "watermark" : 1714407456182
}

However new commit add new class fields:
image
Spark read tag system tableโ€˜s jar is compiled after 2024-04-15.
So new version code read tag's tagCreateTime using LocalDateTime.MIN.
image
This directly made next exception

Caused by: java.lang.ArithmeticException: long overflow
	at java.lang.Math.multiplyExact(Math.java:892)
	at org.apache.spark.sql.catalyst.util.DateTimeUtils$.millisToMicros(DateTimeUtils.scala:240)
	at org.apache.spark.sql.catalyst.util.DateTimeUtils$.fromJavaTimestamp(DateTimeUtils.scala:190)
	at org.apache.spark.sql.catalyst.util.DateTimeUtils.fromJavaTimestamp(DateTimeUtils.scala)

Because LocalDateTime.MIN timestamp millis convert to micros is bigger than Long.MAX_VALUE.
image
I think there could use a big Date to instead LocalDateTime.MIN which is just a symbol to express old Tag file do not having tagCreateTime field. Such as we could use Epoch time.
So i will submit a PR to fix it.

from paimon.

JingsongLi avatar JingsongLi commented on June 16, 2024

Thanks @eric666666 for reporting and investigation. We should return null for these two fields when they are nulls.

from paimon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.