diff --git a/cpp/velox/compute/WholeStageResultIterator.cc b/cpp/velox/compute/WholeStageResultIterator.cc index ae6a81ad9dc73..5e4f243d61e2c 100644 --- a/cpp/velox/compute/WholeStageResultIterator.cc +++ b/cpp/velox/compute/WholeStageResultIterator.cc @@ -383,7 +383,7 @@ std::unordered_map WholeStageResultIterator::getQueryC configs[velox::core::QueryConfig::kSparkBloomFilterMaxNumBits] = getConfigValue(confMap_, kBloomFilterMaxNumBits, "4194304"); - configs[velox::core::QueryConfig::kArrowBridgeTimestampUnit] = 2; + configs[velox::core::QueryConfig::kArrowBridgeTimestampUnit] = "6"; } catch (const std::invalid_argument& err) { std::string errDetails = err.what(); @@ -414,7 +414,7 @@ std::shared_ptr WholeStageResultIterator::createConnectorConfig() // The semantics of reading as lower case is opposite with case-sensitive. configs[velox::connector::hive::HiveConfig::kFileColumnNamesReadAsLowerCase] = getConfigValue(confMap_, kCaseSensitive, "false") == "false" ? "true" : "false"; - configs[velox::connector::hive::HiveConfig::kArrowBridgeTimestampUnit] = 2; + configs[velox::connector::hive::HiveConfig::kArrowBridgeTimestampUnit] = "6"; return std::make_shared(configs); } diff --git a/cpp/velox/memory/VeloxColumnarBatch.cc b/cpp/velox/memory/VeloxColumnarBatch.cc index 85da7f7c442cd..3256241f0789b 100644 --- a/cpp/velox/memory/VeloxColumnarBatch.cc +++ b/cpp/velox/memory/VeloxColumnarBatch.cc @@ -66,14 +66,14 @@ void VeloxColumnarBatch::ensureFlattened() { std::shared_ptr VeloxColumnarBatch::exportArrowSchema() { auto out = std::make_shared(); ensureFlattened(); - velox::exportToArrow(flattened_, ArrowUtils::getBridgeOptions(), *out); + velox::exportToArrow(flattened_, *out, ArrowUtils::getBridgeOptions()); return out; } std::shared_ptr VeloxColumnarBatch::exportArrowArray() { auto out = std::make_shared(); ensureFlattened(); - velox::exportToArrow(flattened_, ArrowUtils::getBridgeOptions(), *out, flattened_->pool()); + velox::exportToArrow(flattened_, *out, flattened_->pool(), ArrowUtils::getBridgeOptions()); return out; } diff --git a/cpp/velox/tests/VeloxColumnarBatchSerializerTest.cc b/cpp/velox/tests/VeloxColumnarBatchSerializerTest.cc index 3c6364f636e41..71949fa76a33a 100644 --- a/cpp/velox/tests/VeloxColumnarBatchSerializerTest.cc +++ b/cpp/velox/tests/VeloxColumnarBatchSerializerTest.cc @@ -53,7 +53,7 @@ TEST_F(VeloxColumnarBatchSerializerTest, serialize) { auto buffer = serializer->serializeColumnarBatches({batch}); ArrowSchema cSchema; - exportToArrow(vector, ArrowUtils::getBridgeOptions(), cSchema); + exportToArrow(vector, cSchema, ArrowUtils::getBridgeOptions()); auto deserializer = std::make_shared(arrowPool_.get(), veloxPool_, &cSchema); auto deserialized = deserializer->deserialize(const_cast(buffer->data()), buffer->size()); auto deserializedVector = std::dynamic_pointer_cast(deserialized)->getRowVector(); diff --git a/cpp/velox/utils/VeloxArrowUtils.cc b/cpp/velox/utils/VeloxArrowUtils.cc index d91cb58bbf2f2..de67275c80a4c 100644 --- a/cpp/velox/utils/VeloxArrowUtils.cc +++ b/cpp/velox/utils/VeloxArrowUtils.cc @@ -26,7 +26,7 @@ namespace gluten { using namespace facebook; void toArrowSchema(const velox::TypePtr& rowType, facebook::velox::memory::MemoryPool* pool, struct ArrowSchema* out) { - exportToArrow(velox::BaseVector::create(rowType, 0, pool), ArrowUtils::getBridgeOptions(), *out); + exportToArrow(velox::BaseVector::create(rowType, 0, pool), *out, ArrowUtils::getBridgeOptions()); } std::shared_ptr toArrowSchema(const velox::TypePtr& rowType, facebook::velox::memory::MemoryPool* pool) { diff --git a/cpp/velox/utils/VeloxArrowUtils.h b/cpp/velox/utils/VeloxArrowUtils.h index d310877d3dbb6..3fb350266daab 100644 --- a/cpp/velox/utils/VeloxArrowUtils.h +++ b/cpp/velox/utils/VeloxArrowUtils.h @@ -31,9 +31,9 @@ namespace gluten { class ArrowUtils { public: - static facebook::velox::BridgeOptions getBridgeOptions() { - facebook::velox::BridgeOptions options; - options.timestampUnit = static_cast(2); + static ArrowOptions getBridgeOptions() { + ArrowOptions options; + options.timestampUnit = static_cast(6); return options; } }; diff --git a/ep/build-velox/src/get_velox.sh b/ep/build-velox/src/get_velox.sh index e430dd7c1bb96..7454b0d10e83b 100755 --- a/ep/build-velox/src/get_velox.sh +++ b/ep/build-velox/src/get_velox.sh @@ -16,8 +16,8 @@ set -exu -VELOX_REPO=https://github.com/oap-project/velox.git -VELOX_BRANCH=update +VELOX_REPO=https://github.com/yma11/velox.git +VELOX_BRANCH=12-6 VELOX_HOME="" #Set on run gluten on HDFS