Implement Handling for Insertions into Views in YSQLSchema
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu trong lớp YSQLSchema, tại phương thức truy xuất thông tin bảng, sử dụng các cột table_type và is_insertable_into của information_schema làm ngữ cảnh liên quan. Thêm các bài kiểm thử bao quát việc nhận diện view và khả năng chèn, sau đó xác minh hành vi kiểm thử cơ sở dữ liệu YSQL và cập nhật tài liệu nếu cần.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The YSQLSchema class in the SQLancer repository currently has a TODO comment indicating that the functionality for handling insertions into views is not fully implemented. This enhancement will ensure that views are correctly identified and their insertability is accurately determined, improving the robustness of the YSQL database testing framework.
Current Code Context
In the YSQLSchema class, the method responsible for retrieving table information includes a TODO comment related to views:
while (rs.next()) {
String tableName = rs.getString("table_name");
String tableTypeSchema = rs.getString("table_schema");
boolean isInsertable = rs.getBoolean("is_insertable_into");
// TODO: also check insertable
// TODO: insert into view?
boolean isView = tableName.startsWith("v"); // tableTypeStr.contains("VIEW") ||
// tableTypeStr.contains("LOCAL TEMPORARY") &&
// !isInsertable;
YSQLTable.TableType tableType = getTableType(tableTypeSchema);
List<YSQLColumn> databaseColumns = getTableColumns(con, tableName);
List<YSQLIndex> indexes = getIndexes(con, tableName);
List<YSQLStatisticsObject> statistics = getStatistics(con);
YSQLTable t = new YSQLTable(tableName, databaseColumns, indexes, tableType, statistics, isView,
isInsertable);
for (YSQLColumn c : databaseColumns) {
c.setTable(t);
}
databaseTables.add(t);
What I'll changes
- Identify Views Properly: Use the
table_typecolumn frominformation_schema.tablesto accurately determine if a table is a view. - Check Insertability: Utilize the
is_insertable_intocolumn to determine if a view can be inserted into.
what I'll do
- Implement the changes in the
YSQLSchemaclass. - Add unit tests to verify the correct identification and handling of views.
- Update documentation to reflect these changes.
Please let me know if you need further clarification.
- Ngôn ngữ chính
- Java
- Star
- 1.8k
- Fork
- 398
- Merge trung bình
- 4 giờ 52 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sqlancer/sqlancer
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
-
CI Failure: Multiple DBMS Test Suites Are Failing (Citus, CnosDB, Databend, DataFusion, Hive, Materialize, TiDB, YugabyteDB)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
[Question] Unable to test hiveCó thể đã có người làm @Saadmadni84 đã nhận 271 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
-
PostgreSQL Version 15 Upgrade - Supporting MERGE FunctionCó thể đã có người làm @yaojiejia đã nhận 459 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Tất cả issue của sqlancer/sqlancer
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
portfolio-performance/portfolio#6119 ·
Maintainer thường phản hồi trong vòng 8 ngày
-
Bump up AWS SDK to 2.54.3Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jenkinsci/ec2-plugin#2041 ·
-
L: github:actions L: php:composer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
dependabot/dependabot-core#16493 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SHOW EDIT of a subclass for an object of its superclass: the form fails to open with AssertionErrorĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100