Open 7phs opened 1 year ago
Related issue of Apache Arrow - https://github.com/apache/arrow/issues/38795
databricks-sql-go
updated and uses Apache Arrow Go v16 with fixed data race.
This bug is fixed now.
A bug of a data race still exists with reverting the Apache Arrow version to v12
.
Why was the Apache Arrow version reverted back to v12? It uses golang.org/x/net v0.7.0
which has several vulnerabilities.
@nverkhachoyan The reason for reverting was to maintain backward compatibility with some end-user solutions.
The databricks-sql-go
library has been updated to use golang.org/x/net v0.17.0
, which addresses all known vulnerabilities. All dependencies adhere to the same versioning level (minor, in this case) as per Go module rules.
However, the data race bug in Apache Arrow v12 still persists.
You can use the following workaround:
func init() {
_, _ = arrow.FixedWidthTypes.Timestamp_s.(*arrow.TimestampType).GetToTimeFunc()
_, _ = arrow.FixedWidthTypes.Timestamp_ms.(*arrow.TimestampType).GetToTimeFunc()
_, _ = arrow.FixedWidthTypes.Timestamp_us.(*arrow.TimestampType).GetToTimeFunc()
_, _ = arrow.FixedWidthTypes.Timestamp_ns.(*arrow.TimestampType).GetToTimeFunc()
}
Insert this snippet into any appropriate file that uses Apache Arrow.
Hello,
I found a data race with reading data from Databricks simultaneously. For example, from different tables or reading catalogs metadata simultaneously.
A code to reproduce data race is
A command to run this test with data race detector:
A root cause of data race is not initialised field loc of arrow.TimestampType. It initialised in the first call of function arrow.TimestampType :: GetZone().
A workaround of data race is:
Environment: