我有一个 Denodo 视图,其中包含四列 type long
,表示出生日期的元素。如果缺少日期,则所有四列都填充为 0。我尝试将它们转换为单个日期列,如下所示:
SELECT CASE WHEN a.gbjh = 0 THEN NULL
ELSE TO_LOCALDATE('yyyyMMdd', CONCAT(CAST('text', a.gbjh),
CAST('int', a.gbj),
CAST('int', a.gbm),
CAST('int', a.gbt)))
END AS birth_date
FROM source_table AS a
这产生QUERY [VIRTUAL] [ERROR]
.
有趣的是,TO_LOCALDATE('yyyyMMdd', CONCAT(CAST('int', a.gbjh), CAST('int', a.gbj), '01', '01')) END AS birth_date
工作。
执行跟踪的摘录:
QUERY: SELECT * FROM aux_partner0 LIMIT 150 CONTEXT ('i18n'='de_euro', 'cache_wait_for_load'='true') TRACE
EXECUTION PLAN (
name = Execution
startTime = Thu May 14 08:20:26 646 CEST 2020
endTime = Thu May 14 08:20:35 123 CEST 2020
responseTime = -
numRows = 0
state = ERROR
completed = false
waitingTime = 0
STATIC OPTIMIZATION (
staticOptimized = false
staticOptimizationTime = 6
staticOptimizationStart = Thu May 14 08:20:26 649 CEST 2020
staticOptimizationEnd = Thu May 14 08:20:26 655 CEST 2020
)
COST OPTIMIZATION (
costOptimized = false
costOptimizationMessages = [Missing statistics or not activated in the following nodes: bv_01057_pndaktion,bv_01057_ptke,bv_01057_ptph1,bv_01057_ptzahlungskanal]
)
VIRTUAL PLAN (
name = aux_partner0
database = sdp_uc_claimscontrolling
startTime = Thu May 14 08:20:26 657 CEST 2020
endTime = Thu May 14 08:20:35 123 CEST 2020
responseTime = -
numRows = 0
state = ERROR
completed = false
fields = [...]
search conditions = []
filter conditions = []
orderByFields = []
ordered = false
numOfFilteredTuples = 0
numOfDuplicatedTuples = 0
numOfSwappedTuples = 0
swapping = false
memoryLimitReached = false
mainTime = 0 ns
distinct = true
viewType = PROJECT
indexes = []
)
)
关于可能导致此问题的任何想法?