Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions packages/cubejs-backend-native/src/orchestrator.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use crate::node_obj_deserializer::JsValueDeserializer;

Check warning on line 1 in packages/cubejs-backend-native/src/orchestrator.rs

View workflow job for this annotation

GitHub Actions / Check fmt/clippy

Diff in /__w/cube/cube/packages/cubejs-backend-native/src/orchestrator.rs
use crate::transport::MapCubeErrExt;
use cubeorchestrator::query_message_parser::QueryResult;
use cubeorchestrator::query_result_transform::{
DBResponsePrimitive, RequestResultData, RequestResultDataMulti, TransformedData,
};
use cubeorchestrator::query_result_transform::{DBResponsePrimitive, DBResponseValue, RequestResultData, RequestResultDataMulti, TransformedData};
use cubeorchestrator::transport::{JsRawData, TransformDataRequest};
use cubesql::compile::engine::df::scan::{FieldValue, ValueObject};
use cubesql::CubeError;
Expand Down Expand Up @@ -258,7 +256,12 @@
let js_row = JsObject::new(&mut cx);
for (key, value) in result.columns.iter().zip(row.iter()) {
let js_key = cx.string(key);
let js_value = cx.string(value.to_string());
let js_value: Handle<'_, JsValue> = match value {
DBResponseValue::Primitive(DBResponsePrimitive::Null) => cx.null().upcast(),
// For compatibility, we convert all primitives to strings
other => cx.string(other.to_string()).upcast(),
};

js_row.set(&mut cx, js_key, js_value)?;
}
Ok(js_row)
Expand Down
Loading