json_replace问题

Viewed 53

在控制台使用json_replace,执行文档里的demo语句可以执行成功,但是当使用表里的变量字段时,报错。select json_replace(esdata, "$.k", 2) from del_table where id='658520210003329792022030365490'\G;其中esdata是表del_table里的字段,字段类型为string,请问json_replace不支持表里变量吗

2 Answers

ERROR 1105 (HY000): errCode = 2, detailMessage = (statc001.ipph.cn)[INTERNAL_ERROR]Function json_replace get failed, expr is VectorizedFnCall[json_replace](arguments=esData, String, String, String,return=Nullable(String)) and return type is Nullable(String).
{
"ClassificationDomestic" : "",
"ClassificationNational" : "",
"ClassificationsECLA" : "",
"Country" : "AU",
"Kind" : "A",
"abs" : "",
"additions" : [],
"addrCity" : [],
"addrCounty" : [],
"addrProvince" : "[]\n",
"addrTown" : [],
"address" : "",
"agencyName" : "",
"agentInfo" : null,
"agentName" : [],
"agentQuantity" : "0",
"appCountryCode" : "AU",
"appDate" : "2021.08.26",
"appKind" : "A",
"appNumber" : [ "AU2021332979A1", "AU202100000332979A", "AU2021332979A", "" ],
"appResource" : "国家",
"applicantInfo" : [],
"applicantName" : [],
"applicantQuantity" : "0",
"applicantType" : [],
"assistantCensor" : [],
"bgKey" : [],
"censor" : [],
"clKey" : [],
"cnAbs" : "",
"cnAgencyName" : "",
"cnAgentName" : [],
"cnApplicantInfo" : [],
"cnApplicantName" : [],
"cnBgKey" : [],
"cnCensor" : [],
"cnClKey" : [],
"cnDeceasedInventorName" : [],
"cnFirstApplyName" : "",
"cnFirstInventorName" : "",
"cnFirstPatentee" : "",
"cnInventorName" : [],
"cnInvertorInfo" : [],
"cnName" : "",
"cnPatentWords" : [],
"cnPatenteeInfo" : [],
"cnStoreBgKey" : [],
"cnStoreClKey" : [],
"cnStorePatentWords" : [],
"cnStoreTitleKey" : [],
"cnTitleKey" : [],
"continuations" : [],
"continuingReissues" : [],
"countryCode" : "",
"countryName" : "未知",
"cpcClass" : [],
"cpcClassBigClass" : [],
"cpcClassGroup" : [],
"cpcClassSection" : [],
"cpcClassSubClass" : [],
"cpcClassSubGroup" : [],
"cpcInventClass" : [],
"cpcMainClass" : "",
"cpcMainClassBigClass" : "",
"cpcMainClassGroup" : "",
"cpcMainClassSection" : "",
"cpcMainClassSubClass" : "",
"cpcMainClassSubGroup" : "",
"customerNumber" : "",
"dbName" : "AUPATENT",
"deceasedInventorName" : [],
"declassifiedPublicationDate" : "",
"den" : "",
"divideApplyNumber" : [],
"divideInitApp" : "",
"divideInitAppNo" : [],
"divideInitDate" : "",
"divisions" : [],
"docKind" : "A1",
"domesticPriorityClaimDetails" : [],
"drawsPath" : "",
"estimatedMaturityDate" : "",
"experimentalData" : "",
"expireDate" : "",
"fdaIces" : [],
"fi" : [],
"fiClass" : [],
"fiClassCount" : "",
"firstApplyName" : "",
"firstApplyType" : "",
"firstInventorName" : "",
"firstPatentee" : "",
"firstPatenteeType" : "",
"firstPriority" : [],
"firstPriorityCountry" : [],
"firstPubDate" : "",
"fterm" : [],
"ftermClassCount" : "",
"governmentStatement" : "",
"grantDate" : "",
"iapp" : "",
"iappDate" : "",
"iappNo" : [],
"id" : "658520210003329792022030365490",
"inventorName" : [],
"invertorInfo" : [],
"ipc" : [],
"ipcClass" : [],
"ipcGroup" : [],
"ipcQuantity" : "0",
"ipcSection" : [],
"ipcSta" : [],
"ipcSubClass" : [],
"ipcSubGroup" : [],
"ipphAppDate" : "20210826",
"ipphAppInfo" : "AU202100000332979A_20210826",
"ipphAppNumber" : "AU202100000332979",
"ipphPubDate" : "20220303",
"ipphPubInfo" : "AU2021000332979A1_20220303",
"ipphPubNumber" : "AU2021000332979A1",
"ipub" : " ",
"ipubDate" : "",
"ipubLang" : "",
"ipubNo" : [],
"mainIpc" : "",
"mainIpcClass" : "",
"mainIpcGroup" : "",
"mainIpcSection" : "",
"mainIpcSta" : "",
"mainIpcSubClass" : "",
"mainIpcSubGroup" : "",
"name" : "",
"op" : "D",
"orgAbs" : "",
"orgAgencyName" : "",
"orgAgentInfo" : null,
"orgAgentName" : [],
"orgAppNumber" : "AU2021332979",
"orgApplicantInfo" : [],
"orgApplicantName" : [],
"orgBgKey" : [],
"orgCensor" : [],
"orgClKey" : [],
"orgDeceasedInventorName" : [],
"orgFirstApplyName" : "",
"orgFirstInventorName" : "",
"orgFirstPatentee" : "",
"orgInventorName" : [],
"orgInvertorInfo" : [],
"orgName" : "",
"orgPatentWords" : [],
"orgPatentee" : null,
"orgPatenteeInfo" : [],
"orgPubNumber" : "AU2021332979A1",
"orgStoreBgKey" : [],
"orgStoreClKey" : [],
"orgStorePatentWords" : [],
"orgStoreTitleKey" : [],
"orgTitleKey" : [],
"otherRelatedDocuments" : [],
"pagesQuantity" : "",
"partialContinuations" : [],
"patDocID" : "AU-20220303-2021000332979-A1",
"patType" : "",
"patentWords" : [],
"patentee" : null,
"patenteeAddress" : "",
"patenteeCity" : [],
"patenteeCounty" : [],
"patenteeInfo" : [],
"patenteeProvince" : "[]\n",
"patenteeQuantity" : "0",
"patenteeTown" : [],
"patenteeType" : [],
"pdfAddr" : "AU2021000332979A1.PDF",
"previouslyFiledApplications" : [],
"priority" : [],
"priorityCountry" : [],
"priorityInfo" : [],
"priorityNo" : [],
"proCode" : [],
"proposeReviewLength" : "",
"provinceCode" : "",
"provinceName" : "",
"pubCountryCode" : "AU",
"pubDate" : "2023.04.06",
"pubNumber" : [ "AU2021332979A1", "AU2021000332979A1", "AU2021332979A1", "" ],
"publicType" : "",
"receivingOffice" : "AU",
"reexaminationDocs" : [],
"reissuedDocs" : [],
"reviewLength" : "",
"simplePatentType" : "",
"storeBgKey" : [],
"storeClKey" : [],
"storePatentWords" : [],
"storeTitleKey" : [],
"substantiveEffectiveDate" : "",
"substituteds" : [],
"tableSn" : "118",
"tifDistributePath" : [],
"titleKey" : [],
"unionClassCount" : "",
"unionSubClassCount" : "",
"upc" : [],
"upcClass" : [],
"utilityModelBasis" : [],
"wipoApplyNumber" : ""
}
CREATE TABLE del_table (
id CHAR(60) NOT NULL,
patType CHAR(10) NULL,
publicType CHAR(10) NULL,
docKind CHAR(5) NULL,
mainIpcSubGroup TEXT NULL,
cpcMainClassSubGroup TEXT NULL,
dbName CHAR(20) NULL,
orgAppNumber CHAR(160) NULL,
orgPubNumber CHAR(160) NULL,
ctime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
dPubDate DATE NULL,
dAppDate DATE NULL,
docType INT NULL,
op CHAR(1) NULL,
issueNo DATE NULL,
ipphAppInfo CHAR(60) NULL,
ipphPubInfo CHAR(60) NULL,
esData TEXT NULL,
country CHAR(2) NULL,
pageSort LARGEINT NULL DEFAULT "0"
) ENGINE=OLAP
UNIQUE KEY(id)
DISTRIBUTED BY HASH(id) BUCKETS 32
PROPERTIES (
"replication_allocation" = "tag.location.default: 2",
"min_load_replica_num" = "-1",
"bloom_filter_columns" = "orgAppNumber, orgPubNumber, ipphAppInfo",
"is_being_synced" = "false",
"colocate_with" = "patentgroup",
"storage_medium" = "hdd",
"storage_format" = "V2",
"inverted_index_storage_format" = "V1",
"enable_unique_key_merge_on_write" = "false",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"enable_single_replica_compaction" = "false",
"group_commit_interval_ms" = "10000",
"group_commit_data_bytes" = "134217728"
);

方便贴下具体esdata的数据吗,以及show create table 看下