我在 azure databricks 版本 6.3 - Spark 2.4.4 上有一个工作笔记本
此笔记本使用其连接器将数据引入 Azure Synapse Analytics
当我将笔记本升级到版本 7.0 - Spark 3.0.0 时,该过程开始失败并出现以下错误:
com.microsoft.sqlserver.jdbc.SQLServerException: HdfsBridge::recordReaderFillBuffer - 填充记录读取器缓冲区时遇到意外错误:ClassCastException: 类 java.lang.Long 无法转换为类 java.lang.Integer(java.lang.Long 和 java.lang.Long lang.Integer 在加载程序'bootstrap'的模块 java.base 中)[ErrorCode = 106000] [SQLState = S0001]
这是 Synapse Analytics 中的表架构:
CREATE TABLE [dbo].[IncrementalDestination]
(
[Id] [int] NOT NULL,
[VarChar] [varchar](1000) NULL,
[Char] [char](1000) NULL,
[Text] [varchar](1000) NULL,
[NVarChar] [nvarchar](1000) NULL,
[NChar] [nchar](1000) NULL,
[NText] [nvarchar](1000) NULL,
[Date] [date] NULL,
[Datetime] [datetime] NULL,
[Datetime2] [datetime2](7) NULL,
[Smalldatetime] [smalldatetime] NULL,
[Bigint] [bigint] NULL,
[Bit] [bit] NULL,
[Decimal] [decimal](18, 0) NULL,
[Int] [int] NULL,
[Money] [money] NULL,
[Numeric] [numeric](18, 0) NULL,
[Smallint] [smallint] NULL,
[Smallmoney] [smallmoney] NULL,
[Tinyint] [tinyint] NULL,
[Float] [float] NULL,
[Real] [real] NULL,
[Column With Space] [varchar](1000) NULL,
[Column_ç_$pecial_char] [varchar](1000) NULL,
[InsertionDateUTC] [datetime] NOT NULL,
[De_LastUpdated] [datetime2](3) NOT NULL
)
WITH
(
DISTRIBUTION = ROUND_ROBIN,
CLUSTERED COLUMNSTORE INDEX
)
GO
这是 Databricks 在读取 Azure BlobStorage 中的一堆拼花后生成的架构
root
|-- Id: long (nullable = true)
|-- VarChar: string (nullable = true)
|-- Char: string (nullable = true)
|-- Text: string (nullable = true)
|-- NVarChar: string (nullable = true)
|-- NChar: string (nullable = true)
|-- NText: string (nullable = true)
|-- Date: timestamp (nullable = true)
|-- Datetime: timestamp (nullable = true)
|-- Datetime2: timestamp (nullable = true)
|-- Smalldatetime: timestamp (nullable = true)
|-- Bigint: long (nullable = true)
|-- Bit: boolean (nullable = true)
|-- Decimal: long (nullable = true)
|-- Int: long (nullable = true)
|-- Money: double (nullable = true)
|-- Numeric: long (nullable = true)
|-- Smallint: long (nullable = true)
|-- Smallmoney: double (nullable = true)
|-- Tinyint: long (nullable = true)
|-- Float: double (nullable = true)
|-- Real: double (nullable = true)
|-- Column_With_Space: string (nullable = true)
|-- Column_ç_$pecial_char: string (nullable = true)
|-- InsertionDateUTC: timestamp (nullable = true)
|-- De_LastUpdated: timestamp (nullable = false)
我看到了这个
Int: long (nullable = true)
但是我能做什么呢?
这种转换不应该是自然而容易完成的吗?
我认为这些新功能有些问题=]