Merge remote-tracking branch 'upstream/branch0101' into branch0101

This commit is contained in:
Qu 2023-12-22 22:09:58 +08:00
commit 65c13eb86d
361 changed files with 431 additions and 162 deletions

View File

@ -13,6 +13,7 @@
package com.antgroup.openspg.builder.core.physical.operator.protocol;
import java.util.HashMap;
import java.util.Map;
import lombok.Getter;
import lombok.Setter;
@ -30,4 +31,11 @@ public class PythonRecord {
public String getId() {
return properties.get("id");
}
public Map<String, Object> toMap() {
Map<String, Object> results = new HashMap<>(2);
results.put("spgTypeName", spgTypeName);
results.put("properties", properties);
return results;
}
}

View File

@ -51,8 +51,8 @@ public class OperatorFusing implements EntityFusing {
@Override
public List<BaseAdvancedRecord> entityFusing(List<BaseAdvancedRecord> records)
throws FusingException {
List<PythonRecord> pythonRecords =
CollectionsUtils.listMap(records, PythonRecordConvertor::toPythonRecord);
List<Map<String, Object>> pythonRecords =
CollectionsUtils.listMap(records, r -> PythonRecordConvertor.toPythonRecord(r).toMap());
InvokeResultWrapper<List<PythonRecord>> invokeResultWrapper = null;
try {
Map<String, Object> result =

View File

@ -52,7 +52,7 @@ public class OperatorPredicting implements PropertyPredicting {
@Override
public List<BaseAdvancedRecord> propertyPredicting(BaseAdvancedRecord record)
throws PredictingException {
PythonRecord pythonRecord = PythonRecordConvertor.toPythonRecord(record);
Map<String, Object> pythonRecord = PythonRecordConvertor.toPythonRecord(record).toMap();
InvokeResultWrapper<List<PythonRecord>> invokeResultWrapper = null;
try {
Map<String, Object> result =

View File

@ -40,14 +40,6 @@ public abstract class BaseSPGRecord extends BaseRecord implements WithSPGTypeEnu
return rawPropertyValueMap;
}
public Map<String, Object> getStdPropertyValueMap() {
Map<String, Object> stdPropertyValueMap = new HashMap<>(getProperties().size());
for (BasePropertyRecord propertyRecord : getProperties()) {
stdPropertyValueMap.put(propertyRecord.getName(), propertyRecord.getValue().getStds());
}
return stdPropertyValueMap;
}
public Map<String, String> getStdStrPropertyValueMap() {
Map<String, String> stdStrPropertyValueMap = new HashMap<>(getProperties().size());
for (BasePropertyRecord propertyRecord : getProperties()) {

View File

@ -22,7 +22,9 @@ import com.antgroup.openspg.cloudext.interfaces.searchengine.model.idx.record.Id
import com.google.common.collect.Lists;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@SuppressWarnings({"rawtypes", "unchecked"})
public class SPGRecord2IdxServiceImpl implements SPGRecord2IdxService {
@Override
@ -36,6 +38,9 @@ public class SPGRecord2IdxServiceImpl implements SPGRecord2IdxService {
new IdxRecordAlterItem(
item.getAlterOp(),
new IdxRecord(
spgRecord.getName(), spgRecord.getId(), 0.0, spgRecord.getStdPropertyValueMap())));
spgRecord.getName(),
spgRecord.getId(),
0.0,
(Map) spgRecord.getStdStrPropertyValueMap())));
}
}

View File

@ -1 +0,0 @@
0.0.1-beta2

View File

@ -1,2 +0,0 @@
recursive-include knext *
recursive-exclude knext/examples *

3
python/knext/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/*.whl
/*.egg-info/
/build/

View File

@ -0,0 +1 @@
0.0.1-beta2

View File

@ -7,4 +7,4 @@ http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
or implied.

2
python/knext/MANIFEST.in Normal file
View File

@ -0,0 +1,2 @@
recursive-include knext *
recursive-exclude knext/examples *

Some files were not shown because too many files have changed in this diff Show More