Is `VisitBaseType` internal field used consistently?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu từ TSqlFragmentVisitor và so sánh các triển khai của Visit và ExplicitVisit, sử dụng DeclareCursorStatement và các nhánh VisitBaseType của nó làm ví dụ cụ thể. Kiểm tra các phương thức visitor tương ứng của SQL fragment để tìm điều kiện bị đảo ngược và ghi lại liệu hành vi này có chủ đích hay không cũng như VisitBaseType nên được diễn giải như thế nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
While diving deep into debugging my app I accidentally have noticed this: TSqlFragmentVisitor final code contains many blocks which check of VisitBaseType internal field value and if it is true then Visit method for base types is called, but for some sql-fragment classes Visit method implementation has this check negated and the behavior is reversed:
// Summary:
// Visitor for DeclareCursorStatement
public virtual void Visit(DeclareCursorStatement node)
{
if (!VisitBaseType) <<<--- here
{
Visit((TSqlFragment)node);
}
}
//
// Summary:
// Explicit Visitor for DeclareCursorStatement
public virtual void ExplicitVisit(DeclareCursorStatement node)
{
if (VisitBaseType)
{
Visit((TSqlStatement)node);
Visit((TSqlFragment)node);
}
Visit(node);
node.AcceptChildren(this);
}
Is this expected behavior? If so, please clarify what was the intent, how VisitBaseType should be understood.
- Ngôn ngữ chính
- GAP
- Star
- 277
- Fork
- 43
- Merge trung bình
- 6 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 3
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 microsoft/SqlScriptDOM
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/SqlScriptDOM#228 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoft/SqlScriptDOM#183 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
microsoft/SqlScriptDOM#226 · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
microsoft/SqlScriptDOM#225 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
microsoft/SqlScriptDOM#224 ·
Tất cả issue của microsoft/SqlScriptDOM
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
oxc-project/oxc#26944 ·
-
todo:perf
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
bug
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tenstorrent/tt-metal#57393 · 1 bình luận ·
-
StUnhex.number() misformats Long.MIN_VALUE as scientific notation instead of a plain integer Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
objectionary/eo#8894 ·