<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic java.lang.ArithmeticException: Casting XXXXXXXXXXX to int causes overflow in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/java-lang-arithmeticexception-casting-xxxxxxxxxxx-to-int-causes/m-p/24642#M17158</link>
    <description>&lt;P&gt;My job started failing with the below error when inserting rows into a delta table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;ailing with the below error when inserting rows (timestamp) to a delta table, it was working well before.&lt;/P&gt;&lt;P&gt;java.lang.ArithmeticException: Casting XXXXXXXXXXX to int causes overflow&lt;/P&gt;</description>
    <pubDate>Fri, 25 Mar 2022 15:46:04 GMT</pubDate>
    <dc:creator>shan_chandra</dc:creator>
    <dc:date>2022-03-25T15:46:04Z</dc:date>
    <item>
      <title>java.lang.ArithmeticException: Casting XXXXXXXXXXX to int causes overflow</title>
      <link>https://community.databricks.com/t5/data-engineering/java-lang-arithmeticexception-casting-xxxxxxxxxxx-to-int-causes/m-p/24642#M17158</link>
      <description>&lt;P&gt;My job started failing with the below error when inserting rows into a delta table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;ailing with the below error when inserting rows (timestamp) to a delta table, it was working well before.&lt;/P&gt;&lt;P&gt;java.lang.ArithmeticException: Casting XXXXXXXXXXX to int causes overflow&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 15:46:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/java-lang-arithmeticexception-casting-xxxxxxxxxxx-to-int-causes/m-p/24642#M17158</guid>
      <dc:creator>shan_chandra</dc:creator>
      <dc:date>2022-03-25T15:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: java.lang.ArithmeticException: Casting XXXXXXXXXXX to int causes overflow</title>
      <link>https://community.databricks.com/t5/data-engineering/java-lang-arithmeticexception-casting-xxxxxxxxxxx-to-int-causes/m-p/24643#M17159</link>
      <description>&lt;P&gt;This is because the Integer type represents 4-byte signed integer numbers. The range of numbers is from&amp;nbsp;-2147483648&amp;nbsp;to&amp;nbsp;2147483647.&lt;/P&gt;&lt;P&gt;Kindly use double as the data type to insert the "2147483648" value in the delta table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the below example, The second insert will fail when we insert it into the table because it is exceeding the maximum allowed range for int data type. However as a double data type. The value would be successfully inserted because double represents 8-byte signed integer numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg. CREATE TABLE test (c1 int, c2 double);&lt;/P&gt;&lt;P&gt;INSERT INTO test VALUES (2147483647, 2147483647);&lt;/P&gt;&lt;P&gt;INSERT INTO test VALUES (100574987462592, 100574987462592);&lt;/P&gt;&lt;P&gt;INSERT INTO test VALUES (NULL, 100574987462592);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 15:49:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/java-lang-arithmeticexception-casting-xxxxxxxxxxx-to-int-causes/m-p/24643#M17159</guid>
      <dc:creator>shan_chandra</dc:creator>
      <dc:date>2022-03-25T15:49:16Z</dc:date>
    </item>
  </channel>
</rss>

