total 函数问题 远程计算报错,本地计算正常!!!!!!
<!\-\- /\* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:3 0 0 0 1 0;} @font-face {font-family:华文楷体; panose-1:2 1 6 0 4 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:647 135200768 16 0 262303 0;} @font-face {font-family:"\\@华文楷体"; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:647 135200768 16 0 262303 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:11.0pt; font-family:"Courier New"; mso-fareast-font-family:华文楷体; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-font-kerning:1.0pt;} h1 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"标题 1 字符"; mso-style-next:正文; margin-top:17.0pt; margin-right:0cm; margin-bottom:16.5pt; margin-left:21.25pt; text-align:justify; text-justify:inter-ideograph; text-indent:-21.25pt; line-height:240%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:1; mso-list:l0 level1 lfo1; font-size:22.0pt; mso-bidi-font-size:11.0pt; font-family:"Courier New"; mso-fareast-font-family:华文楷体; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-font-kerning:22.0pt; mso-bidi-font-weight:normal;} h2 {mso-style-priority:9; mso-style-qformat:yes; mso-style-link:"标题 2 字符"; mso-style-next:正文; margin-top:13.0pt; margin-right:0cm; margin-bottom:13.0pt; margin-left:49.6pt; text-align:justify; text-justify:inter-ideograph; text-indent:-1.0cm; line-height:173%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:2; mso-list:l0 level2 lfo1; font-size:16.0pt; font-family:"Courier New"; mso-fareast-font-family:华文楷体; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:major-bidi; mso-font-kerning:1.0pt;} h3 {mso-style-priority:9; mso-style-qformat:yes; mso-style-link:"标题 3 字符"; mso-style-next:正文; margin-top:13.0pt; margin-right:0cm; margin-bottom:13.0pt; margin-left:70.9pt; text-align:justify; text-justify:inter-ideograph; text-indent:-1.0cm; line-height:173%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:3; mso-list:l0 level3 lfo1; font-size:16.0pt; font-family:"Courier New"; mso-fareast-font-family:华文楷体; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-font-kerning:1.0pt;} h4 {mso-style-priority:9; mso-style-qformat:yes; mso-style-link:"标题 4 字符"; mso-style-next:正文; margin-top:14.0pt; margin-right:0cm; margin-bottom:14.5pt; margin-left:99.2pt; text-align:justify; text-justify:inter-ideograph; text-indent:-35.4pt; line-height:156%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:4; mso-list:l0 level4 lfo1; font-size:14.0pt; font-family:"Courier New"; mso-fareast-font-family:华文楷体; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:major-bidi; mso-font-kerning:1.0pt;} h5 {mso-style-priority:9; mso-style-qformat:yes; mso-style-link:"标题 5 字符"; mso-style-next:正文; margin-top:14.0pt; margin-right:0cm; margin-bottom:14.5pt; margin-left:127.55pt; text-align:justify; text-justify:inter-ideograph; text-indent:-42.5pt; line-height:156%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:5; mso-list:l0 level5 lfo1; font-size:14.0pt; font-family:"Courier New"; mso-fareast-font-family:华文楷体; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-font-kerning:1.0pt;} span.1 {mso-style-name:"标题 1 字符"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"标题 1"; mso-ansi-font-size:22.0pt; font-family:"Courier New"; mso-ascii-font-family:"Courier New"; mso-fareast-font-family:华文楷体; mso-hansi-font-family:"Courier New"; mso-font-kerning:22.0pt; font-weight:bold; mso-bidi-font-weight:normal;} span.2 {mso-style-name:"标题 2 字符"; mso-style-priority:9; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"标题 2"; mso-ansi-font-size:16.0pt; mso-bidi-font-size:16.0pt; font-family:"Courier New"; mso-ascii-font-family:"Courier New"; mso-fareast-font-family:华文楷体; mso-hansi-font-family:"Courier New"; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:major-bidi; font-weight:bold;} span.3 {mso-style-name:"标题 3 字符"; mso-style-priority:9; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"标题 3"; mso-ansi-font-size:16.0pt; mso-bidi-font-size:16.0pt; font-family:"Courier New"; mso-ascii-font-family:"Courier New"; mso-fareast-font-family:华文楷体; mso-hansi-font-family:"Courier New"; font-weight:bold;} span.4 {mso-style-name:"标题 4 字符"; mso-style-priority:9; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"标题 4"; mso-ansi-font-size:14.0pt; mso-bidi-font-size:14.0pt; font-family:"Courier New"; mso-ascii-font-family:"Courier New"; mso-fareast-font-family:华文楷体; mso-hansi-font-family:"Courier New"; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:major-bidi; font-weight:bold;} span.5 {mso-style-name:"标题 5 字符"; mso-style-priority:9; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"标题 5"; mso-ansi-font-size:14.0pt; mso-bidi-font-size:14.0pt; font-family:"Courier New"; mso-ascii-font-family:"Courier New"; mso-fareast-font-family:华文楷体; mso-hansi-font-family:"Courier New"; font-weight:bold;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-family:等线; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.WordSection1 {page:WordSection1;} /* List Definitions */ @list l0 {mso-list-id:1886483198; mso-list-template-ids:559606400;} @list l0:level1 {mso-level-style-link:"标题 1"; mso-level-text:%1; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:21.25pt; text-indent:-21.25pt;} @list l0:level2 {mso-level-style-link:"标题 2"; mso-level-text:"%1\\.%2"; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:49.6pt; text-indent:-1.0cm;} @list l0:level3 {mso-level-style-link:"标题 3"; mso-level-text:"%1\\.%2\\.%3"; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:70.9pt; text-indent:-1.0cm;} @list l0:level4 {mso-level-style-link:"标题 4"; mso-level-text:"%1\\.%2\\.%3\\.%4"; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:99.2pt; text-indent:-35.4pt;} @list l0:level5 {mso-level-style-link:"标题 5"; mso-level-text:"%1\\.%2\\.%3\\.%4\\.%5"; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:127.55pt; text-indent:-42.5pt;} @list l0:level6 {mso-level-text:"%1\\.%2\\.%3\\.%4\\.%5\\.%6"; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:163.0pt; text-indent:-2.0cm;} @list l0:level7 {mso-level-text:"%1\\.%2\\.%3\\.%4\\.%5\\.%6\\.%7"; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:191.35pt; text-indent:-63.8pt;} @list l0:level8 {mso-level-text:"%1\\.%2\\.%3\\.%4\\.%5\\.%6\\.%7\\.%8"; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:219.7pt; text-indent:-70.9pt;} @list l0:level9 {mso-level-text:"%1\\.%2\\.%3\\.%4\\.%5\\.%6\\.%7\\.%8\\.%9"; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:255.1pt; text-indent:-85.0pt;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} -->
1.1 total 函数的问题
1.1.1 集算器版本:
基于 20230521 版本
后面 你们那边团队反馈这个有 bug ,没法马上进行更新 于是我们之间拉取你们的源码 用 master 进行重新打包
1.1.2 spl 脚本
|
==now()
=days@o(date(“1995-03-15”)) =“1995-03-15”
/>mktsegment=c_mktsegment.pos@b(“BUILDING”)
=file(“/data/soft/esProc/file/SPLTPCH1G/CUSTOMER.ctx”).open().cursor@m(C_CUSTKEY;).fetch().keys@im(C_CUSTKEY) /=file(“customer.ctx”).open().cursor@m(C_CUSTKEY;C_MKTSEGMENT==mktsegment).fetch().keys@im(C_CUSTKEY)
=file(“/data/soft/esProc/file/SPLTPCH1G/ORDERS.ctx”).open().cursor@m(O_ORDERKEY,O_ORDERDATE,O_SHIPPRIORITY;O_ORDERDATE<B2 && A4.find(O_CUSTKEY)) /=file(“orders.ctx”).open().cursor@m(O_ORDERKEY,O_ORDERDATE,O_SHIPPRIORITY;O_ORDERDATE<A2 && A4.find(O_CUSTKEY))
=file(“/data/soft/esProc/file/SPLTPCH1G/LINEITEM.ctx”).open().news@r(A5,O_ORDERKEY,sum(L_EXTENDEDPRICE*(1-L_DISCOUNT)):revenue,O_ORDERDATE,O_SHIPPRIORITY;L_SHIPDATE>B2)
=A6.total(A6.fetch().top(10;-revenue,O_ORDERDATE))
/=A7.run(O_ORDERDATE=O_ORDERDATE)
return A7
|
详细的错误 描述 查看下面的 word 文档
[
docx
]
组表文件过大 我上传到我的百度网盘了
链接:https://pan.baidu.com/s/12G0sCGQQH1myVSXfxjyJbA?pwd=86x5
提取码:86x5
–来自百度网盘超级会员 V3 的分享
远程计算是指什么?
那你们官方 对于这种使用方法 你们官方 词语 怎么表达?
=A6.total(A6.fetch().top(10;-revenue,O_ORDERDATE))
这是在算啥?total 对着游标算,这都 fetch.top 出来了还 total 干吗?
远程出错和组表有关的可能性接近为 0。调试代码要逐步简化,并换小数据量文件,看看问题是不是还出错,尝试出有问题的最小代码,才知道到底在哪一步有错。
关于这个写法 问题 我在问下当时开发这个业务的小伙伴 ,蒋总 咱先抛开这个写法问题 先关注下 为啥 我本地计算 它能返回正常结果 远程计算的时候 就报错了呢 理论上 是不是 本地计算 跟远程计算 效果 一样 才对吧
你这是句非法的语句,就不知道什么叫“正常结果”,这时候正确错误也没有定义了。
退一步讲,就算认为不一致就是错误,前面也说要该怎么排查,要一步步简化问题找到错误所在。
严格地说,我确实不能确认你标题的说法就不对(远程和 total 相关),但就正常的逻辑和经验而言,这两件事有关系的可能性接近于 0。下出这种结论要有很强的证据,经过反复验证过才可以,也就是一步步简化问题,剥离无关的东西找到关键点。该做的功课要做的。
把这么一大团扔上来,别人要复现并不容易,大家都挺忙的啊。
感谢您百忙之中抽出时间给的答复 我们这边有时间 会抽人 进行简化 调整写法 ,我提个小小建议 既然是非法的语句 那执行前 能否 直接给错提示呢 而不是返回一个 “所谓正确的结果”呢
那是不合适的,一定程度也是不可能做到的。至于为什么,你可以自己琢磨一下,假定你自己要写一个编译器或解释器。C/C++ 是非常优秀的程序语言,也有优秀的编译器,但仍然有无数的烂代码以及错代码。
程序语言工具一直在努力减少程序员的辛劳,但总有一些工作是没法替代的。理解编程语言的逻辑,仍然还是程序员的义务。