我正在尝试检查来自输入Parquet文件的列的数据类型,如果数据类型是Integer或Decimal,则运行Spark SQL。//Check datatype of column
for (val_datatype <- datatypes) if (val_datatype.dataType.typeName == "integerapprox_count_distinct($field)/count(1) from parquetDFTable) a
我正在使用MS JDBC driver for SQL Server,并尝试将值插入到十进制(18,5)列中。文档说十进制列映射到BigDecimal,所以我尝试这样做:ps.setObject(1, new BigDecimal(3.14));在调用execute()时,我得到了这个错误:
将数据类型nvarcha