kunpengcompute / boostkit-bigdata Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
The Spark operator connects to the decimal cast and implements precision processing.
Hive UDF Function Support,Interconnecting Spark with UDF Framework
【问题现象】(必选)
整数运算前应进行合法性校验确保不溢出
【问题代码片段】(安全类问题必选,其他问题可选;保留文本非截图)
omnidata/omnidata-hive-connector/connector/src/main/java/org/apache/hadoop/hive/ql/omnidata/decode/PageDecoding.java
片段:299行sliceInput.readBytes(Slices.wrappedIntArray(offsets), SIZE_OF_INT, positionCount * SIZE_OF_INT);
应该避免溢出
PS:
1.代码片段保存文本信息,以便后续可正确导出/查阅
【修改建议】(可选)
Math.multiplyExact(num1, num2)
support function count(*) and count(1)
【问题描述】(必选)
访问一个为null的对象时,会导致空引用问题,代码中抛出NullPointerException。
【修改建议】(可选)
该类问题应该通过预检查的方式进行消解,而不是通过try...catch 机制处理NullPointerException 。
【问题代码片段】(安全类问题必选,其他问题可选;保留文本非截图)
代码路径:
omnidata/omnidata-hive-connector/connector/src/main/java/org/apache/hadoop/hive/ql/omnidata/physical/NdpPlanChecker.java
片段:
109行:LOG.info("Table [{}] failed to push down, since PartitionDesc is null",
110行: tableScanOp.getConf().getAlias());
当tableScanOp.getConf()为null,会发生空指针异常
PS:
1.代码片段保存文本信息,以便后续可正确导出/查阅
子查询中含有常量表达式作为投影列,然后在外层作为窗口函数的分组列,转化为列引用失败出错了
SELECT
statis_cycle_sign, name, dept, salary, ROW_NUMBER() OVER (PARTITION BY statis_cycle_sign, name, dept ORDER BY salary) AS rank
FROM
( SELECT 'pt_today' AS statis_cycle_sign, name, dept, salary, age from employees) ;
【问题描述】(必选)
进行IO类操作时,必须在try-with-resource或finally里关闭资源。
【修改建议】(可选)
添加try-catch-finally,并在finally中关闭inpustream
【问题代码片段】(安全类问题必选,其他问题可选;保留文本非截图)
代码路径:
omnidata\omnidata-spark-connector\connector\src\main\scala\org\apache\spark\sql\execution\ndp\NdpPushDown.scala
片段:
447行:val inputStream = this.getClass.getResourceAsStream("/"+sourceName),
inputStream没有被关闭,可能出现安全问题
PS:
1.代码片段保存文本信息,以便后续可正确导出/查阅
ORC: TypeKind::Short -> SmallInt -> Omni:Int
OrcColumnarBatchJniReader.cpp, OrcColumnarBgatchJniReader.java needs support for Short type
【问题现象】(必选)
进行IO类操作时,必须在try-with-resource或finally里关闭资源
【问题代码片段】(安全类问题必选,其他问题可选;保留文本非截图)
omnidata/omnidata-hive-connector/connector/src/main/java/org/apache/hadoop/hive/ql/omnidata/reader/OmniDataAdapter.java
片段:161行dataReader.close(); 应该在finally里关闭资源
PS:
1.代码片段保存文本信息,以便后续可正确导出/查阅
【修改建议】(可选)
在finally中关闭资源dataReader.close();
When enable AQE, it occurs:
ColumnarToRow does not implement doExeucteBroadcast
Adding a Base Class for Columnar ShuffleManager Validity check
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.