question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[SQL Definition Collation][Oracle]Collate the g4 files of SQL definitions

See original GitHub issue

Hi community,

This issue is to collate the SQL definitions of Oracle. Therefore, we can support parsing more SQLs. We need your interaction! If you

  1. Be familiar with g4 file of Antlr (The grammars are RegularExpression-like)
  2. Understand the Oracle grammars

then welcome!

Background

How is a SQL parsed? SQL definition file ->(Parse to) AST ->(Visit it)
SQLStatment

Process

  1. Compare SQL definitions in Oficial SQL Doc and ShardingSphere SQL Doc
  2. If there is any difference in ShardingSphere SQL Doc, please correct them referring to Official SQL Doc
  3. Run mvn install the current_file_module
  4. Check whether there are any exceptions. If indeed, please fix them. (Especially xxxVisitor.class)
  5. Add new corresponding SQL case in SQL Cases and expected parsed result in Expected Statment XML
  6. Run SQLParserParameterizedTest to make sure no exceptions.

Notice

1.Left recursion can not work well in Antlr4,

a
  : b
  | a b
  ;
b
  : a c
  ;
c
  : ...
  ;

you can consider the following one,

a
  : b*
  ;
b
  : a c
  ;
c
  : ...
  ;
  1. Here is a Chinese version for reference.

subtask

DML

DDL-ALTER

  • ALTER ANALYTIC VIEW doc
  • ALTER ATTRIBUTE DIMENSION doc
  • ALTER AUDIT POLICY (Unified Auditing) doc
  • ALTER CLUSTER doc
  • ALTER DATABASE doc
  • ALTER DATABASE DICTIONARY doc
  • ALTER DATABASE LINK doc
  • ALTER DIMENSION doc
  • ALTER DISKGROUP doc
  • ALTER FLASHBACK ARCHIVE doc
  • ALTER FUNCTION doc
  • ALTER HIERARCHY doc
  • ALTER INDEX doc
  • ALTER INDEXTYPE doc
  • ALTER INMEMORY JOIN GROUP doc
  • ALTER JAVA doc
  • ALTER LIBRARY doc
  • ALTER LOCKDOWN PROFILE doc
  • ALTER MATERIALIZED VIEW doc
  • ALTER MATERIALIZED VIEW LOG doc
  • ALTER MATERIALIZED ZONEMAP doc
  • ALTER OPERATOR doc
  • ALTER OUTLINE doc
  • ALTER PACKAGE doc
  • ALTER PLUGGABLE DATABASE doc
  • ALTER PROCEDURE doc
  • ALTER PROFILE doc
  • ALTER RESOURCE COST doc
  • ALTER ROLE doc
  • ALTER ROLLBACK SEGMENT doc
  • ALTER SEQUENCE doc
  • ALTER SYNONYM doc
  • ALTER TABLE doc
  • ALTER TABLESPACE doc
  • ALTER TABLESPACE SET doc
  • ALTER TRIGGER doc
  • ALTER TYPE doc
  • ALTER USER doc
  • ALTER VIEW doc

DDL-CREATE

  • CREATE ANALYTIC VIEW doc
  • CREATE ATTRIBUTE DIMENSION doc
  • CREATE AUDIT POLICY (Unified Auditing) doc
  • CREATE CLUSTER doc
  • CREATE CONTEXT doc
  • CREATE CONTROLFILE doc
  • CREATE DATABASE doc
  • CREATE DATABASE LINK doc
  • CREATE DIMENSION doc
  • CREATE DIRECTORY doc
  • CREATE DISKGROUP doc
  • CREATE EDITION doc
  • CREATE FLASHBACK ARCHIVE doc
  • CREATE FUNCTION doc
  • CREATE HIERARCHY doc
  • CREATE INDEX doc
  • CREATE INDEXTYPE doc
  • CREATE INMEMORY JOIN GROUP doc
  • CREATE JAVA doc
  • CREATE LIBRARY doc
  • CREATE LOCKDOWN PROFILE doc
  • CREATE MATERIALIZED VIEW doc
  • CREATE MATERIALIZED VIEW LOG doc
  • CREATE MATERIALIZED ZONEMAP doc
  • CREATE OPERATOR doc
  • CREATE OUTLINE doc
  • CREATE PACKAGE doc
  • CREATE PACKAGE BODY doc
  • CREATE PFILE doc
  • CREATE PLUGGABLE DATABASE doc
  • CREATE PROCEDURE doc
  • CREATE PROFILE doc
  • CREATE RESTORE POINT doc
  • CREATE ROLE doc
  • CREATE ROLLBACK SEGMENT doc
  • CREATE SCHEMA doc
  • CREATE SEQUENCE doc
  • CREATE SPFILE doc
  • CREATE SYNONYM doc
  • CREATE TABLE doc
  • CREATE TABLESPACE doc
  • CREATE TABLESPACE SET doc
  • CREATE TRIGGER doc
  • CREATE TYPE doc
  • CREATE TYPE BODY doc
  • CREATE USER doc
  • CREATE VIEW doc

DDL-DROP

  • DROP ANALYTIC VIEW doc
  • DROP ATTRIBUTE DIMENSION doc
  • DROP AUDIT POLICY (Unified Auditing) doc
  • DROP CLUSTER doc
  • DROP CONTEXT doc
  • DROP DATABASE doc
  • DROP DATABASE LINK doc
  • DROP DIMENSION doc
  • DROP DIRECTORY doc
  • DROP DISKGROUP doc
  • DROP EDITION doc
  • DROP FLASHBACK ARCHIVE doc
  • DROP FUNCTION doc
  • DROP HIERARCHY doc
  • DROP INDEX doc
  • DROP INDEXTYPE doc
  • DROP INMEMORY JOIN GROUP doc
  • DROP JAVA doc
  • DROP LIBRARY doc
  • DROP LOCKDOWN PROFILE doc
  • DROP MATERIALIZED VIEW doc
  • DROP MATERIALIZED VIEW LOG doc
  • DROP MATERIALIZED ZONEMAP doc
  • DROP OPERATOR doc
  • DROP OUTLINE doc
  • DROP PACKAGE doc
  • DROP PLUGGABLE DATABASE doc
  • DROP PROCEDURE doc
  • DROP PROFILE doc
  • DROP RESTORE POINT doc
  • DROP ROLE doc
  • DROP ROLLBACK SEGMENT doc
  • DROP SEQUENCE doc
  • DROP SYNONYM doc
  • DROP TABLE doc
  • DROP TABLESPACE doc
  • DROP TABLESPACE SET doc
  • DROP TRIGGER doc
  • DROP TYPE doc
  • DROP TYPE BODY doc
  • DROP USER doc
  • DROP VIEW doc

DDL-OTHER

Transaction Control Statements

Session Control Statements

  • ALTER SESSION doc
  • SET ROLE doc

System Control Statement

  • ALTER SYSTEM doc

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:19 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
github-actions[bot]commented, Oct 8, 2022

Hello , this issue has not received a reply for several days. This issue is supposed to be closed.

1reaction
everly-gifcommented, May 28, 2022

Thanks @Liangda-w , I will be claiming some soon 😃 I want to work on

  • DROP VIEW
  • DROP TRIGGER
  • CREATE SYNONYM
  • ALTER TRIGGER
  • ALTER VIEW
  • CREATE EDITION
  • ALTER DATABASE LINK
  • ALTER DATABASE DICTIONARY
  • CREATE DIRECTORY
  • DROP DIRECTORY
  • DROP SYNONYM
  • DROP PACKAGE
  • ALTER PACKAGE
Read more comments on GitHub >

github_iconTop Results From Across the Web

COLLATION - Oracle Help Center
COLLATION returns the name of the derived collation for expr . This function returns named collations and pseudo-collations. If the derived collation is...
Read more >
Overview of the Collate SQL command - SQLShack
Collation is a set of rules that tell database engine how to compare and sort the character data in SQL Server. Collation can...
Read more >
MySQL 5.5 Reference Manual - Including MySQL NDB Cluster ...
4.6.11 mysql_find_rows — Extract SQL Statements from Files ............................... 416 ... 5.6 MySQL Server User-Defined Functions .
Read more >
SQL Server Collation Overview and Examples
Solution. We are going to break down the different parts of the COLLATE clause and give meaning to each part so you can...
Read more >
What is collation in Oracle and SQL Server database? - Quora
In SQL, a table column or string literal - as well as query text - has a Character Set and a Collation ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found