File tree 6 files changed +33
-15
lines changed
compiler/src/main/java/com/alibaba/graphscope/common/jna
6 files changed +33
-15
lines changed Original file line number Diff line number Diff line change @@ -419,9 +419,9 @@ jobs:
419
419
- name : Helm Test
420
420
run : |
421
421
cd charts
422
- helm template graphscope --set image.registry="",image.tag=${SHORT_SHA} \
422
+ helm template graphscope --set image.registry="",image.tag=" ${SHORT_SHA}" \
423
423
./graphscope
424
- helm install graphscope --set image.registry="",image.tag=${SHORT_SHA} \
424
+ helm install graphscope --set image.registry="",image.tag=" ${SHORT_SHA}" \
425
425
./graphscope
426
426
helm test graphscope --timeout 5m0s
427
427
export NODE_IP=$(kubectl get pod -lgraphscope.coordinator.name=coordinator-graphscope -ojsonpath="{.items[0].status.hostIP}")
Original file line number Diff line number Diff line change
1
+ package com .alibaba .graphscope .common .jna ;
2
+
3
+ import com .sun .jna .FromNativeContext ;
4
+ import com .sun .jna .ToNativeContext ;
5
+ import com .sun .jna .TypeConverter ;
6
+
7
+ // to convert java boolean to i32 and define i32 as the native bool type
8
+ public class BooleanConverter implements TypeConverter {
9
+ @ Override
10
+ public Object toNative (Object value , ToNativeContext context ) {
11
+ return Integer .valueOf (Boolean .TRUE .equals (value ) ? 1 : 0 );
12
+ }
13
+
14
+ @ Override
15
+ public Object fromNative (Object value , FromNativeContext context ) {
16
+ return ((Integer ) value ).intValue () != 0 ? Boolean .TRUE : Boolean .FALSE ;
17
+ }
18
+
19
+ @ Override
20
+ public Class <?> nativeType () {
21
+ // BOOL is 32-bit int
22
+ return Integer .class ;
23
+ }
24
+ }
Original file line number Diff line number Diff line change @@ -24,5 +24,6 @@ public class IrTypeMapper extends DefaultTypeMapper {
24
24
private IrTypeMapper () {
25
25
super ();
26
26
addTypeConverter (IntEnum .class , new EnumConverter ());
27
+ addTypeConverter (Boolean .class , new BooleanConverter ());
27
28
}
28
29
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ impl TryFrom<FfiVariable> for common_pb::Variable {
371
371
#[ derive( Default ) ]
372
372
pub struct FfiAlias {
373
373
alias : FfiNameOrId ,
374
- is_query_given : bool ,
374
+ is_query_given : i32 ,
375
375
}
376
376
377
377
impl TryFrom < FfiAlias > for Option < common_pb:: NameOrId > {
@@ -942,8 +942,11 @@ mod project {
942
942
use super :: * ;
943
943
/// To initialize a project operator.
944
944
#[ no_mangle]
945
- pub extern "C" fn init_project_operator ( is_append : bool ) -> * const c_void {
946
- let project = Box :: new ( pb:: Project { mappings : vec ! [ ] , is_append } ) ;
945
+ pub extern "C" fn init_project_operator ( is_append : i32 ) -> * const c_void {
946
+ let project = Box :: new ( pb:: Project {
947
+ mappings : vec ! [ ] ,
948
+ is_append : if is_append == 0 { false } else { true } ,
949
+ } ) ;
947
950
Box :: into_raw ( project) as * const c_void
948
951
}
949
952
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments