Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test calcite 5565 druid #14

Merged
merged 279 commits into from
Oct 25, 2024
Merged

Test calcite 5565 druid #14

merged 279 commits into from
Oct 25, 2024

Conversation

JiajunBernoulli
Copy link
Owner

No description provided.

libenchao and others added 30 commits June 17, 2022 08:28
This removes an unreachable condition in CsvTableScan when checking if a table is a JsonTable. The table object can only take the form of a RelOptTable and not a Table.
Signed-off-by: Daniel Henneberger <[email protected]>
…nthesized expression throws ClassCastException

For example,
  SELECT (item).name
  FROM on_hand
throws ClassCastException in checkRollUp while
  SELECT item.name
  FROM on_hand
succeeds.

Close apache#2808
…when generating SQL for UNION ... LIMIT

Co-authored-by: Julian Hyde <[email protected]>
…al conditions from join condition for semi join
…ion [CALCITE-5145] CASE statement within GROUPING SETS throws type mis-match exception

Co-authored-by: yingyuwang <[email protected]>
…el parser

The cause is that Babel sees the upcoming FOR, which is a
reserved keyword in Calcite's core parser but non-reserved
in Babel, and wrongly treats it as an alias.

Close apache#2842
The SQL parser allows invalid MERGE statements with mismatched
parentheses. For example, the following invalid statement is
treated as valid but is missing a trailing ')':

  MERGE INTO emps AS e
  USING temps AS t ON e.empno = t.empno
  WHEN NOT MATCHED
  THEN INSERT (a, b) (VALUES (1, 2);

Similarly if there is a '(' before VALUES but not after.
This commit does not change functionality. Some method
signatures have changed, which might affect derived parsers.
We also fix a few lint warnings outside the parser.

Here are the major refactorings:

1. Remove unused imports and variables;
2. Make variables 'final' wherever possible;
2. Remove unused initializers;
4. Convert optional blocks to mandatory blocks. For example,

  [ e = X() ]

becomes

  ( e = X() | { e = null; } )

and now we can remove e's initializer and make it 'final'.

5. Deprecate the 'startList' method. Previously you would
use 'startList' to initialize the list when adding the
first element:

  List<SqlNode> list;
  ...
  list = startList(e)

Now you initialize the list when it is declared:

  final List<SqlNode> list = new ArrayList<SqlNode>();
  ...
  list.add(e);

This is a bit more work if the list is never used. But it
makes the code to add the first element the same as the code
to add subsequent elements.

6. If parser methods are used to build lists, this change
refactors them to pass the list as an argument. For
example,

  SqlNode OrderItem() : ...

  e = OrderItem() { list.add(e); }
  ( <COMMA> e = OrderItem() { list.add(e); } )*

is now

  void AddOrderItem(List<SqlNode> list) : ...

  AddOrderItem(list) ( <COMMA> AddOrderItem(list) )*

This change adds a 'Add' prefix to existing methods of this
style.

7. Remove an obsolete resource that used to be used by the
parser.
Update release history and other relevant documentation.
MasseGuillaume and others added 29 commits March 14, 2023 22:26
The project primarily uses checkerframework annotations (org
.checkerframework.checker.nullness.qual) for specifying nullability;
not org.jetbrains.annotations.

To keep things consistent and also avoid mixing up annotations from
different providers in the future, this commit removes the last
references to org.jetbrains.annotations and excludes the
org.jetbrains:annotations dependency from the build to avoid
accidentally using such annotations in the future.

Close apache#3102
… ThreadLocal

This is possible now that
  [CALCITE-5295] Read the values of plugins (such as connect string
  properties) from ThreadLocal fields
is fixed in Avatica 1.23; this replaces the previous test
implementation, used a custom subclass of RelDataTypeSystem that
dereferenced a ThreadLocal in its constructor.
…nonyms for DOW, DOY

Add operator tests, and re-enable some of the tests disabled
in [CALCITE-2539].

Close apache#3094
…rary)

Microsoft SQL Server's `CONVERT(type, exp [, style])`
function is equivalent to `CAST(exp AS type)` and the JDBC
standard function `{fn CONVERT(value, type)}`.

This function is not to be confused with standard SQL's
`CONVERT` function, which converts a character string from
one character set to another.

Add `mssqlfunc` connection for QuidemTest.

Close apache#3100
SAFE_CAST is similar to CAST, except that it returns NULL
rather than throwing an error if conversion fails.

The Java code generation generates the same code as for CAST,
wraps it as a lambda, and converts the exception to Java null.

Add a wrapper around SqlOperatorFixture so that existing
tests for CAST can also test SAFE_CAST (Julian Hyde).

Close apache#3093

Co-authored-by: Oliver Lee <[email protected]>
Co-authored-by: Julian Hyde <[email protected]>
- Test ST_LineFromWKB
- Test ST_PointFromWKB
- Test ST_PolyFromWKB
- Improve and test ST_OrderingEquals
- Add and test ST_FlipCoordinates
- Add and test ST_Reverse
- Add and test ST_Normalize
- Add and test ST_Holes
- Add and test ST_RemoveHole
- Add and test ST_ReducePrecision and ST_Densify
- Replace roundGeom with ST_ReducePrecision
- Add and test ST_AddPoint and ST_RemovePoint
- Remove unused method
- Add ST_Buffer and ST_OffsetCurve functions
- Test ST_RemoveRepeatedPoints
- Add ST_AddZ
- Add and test ST_Split
- Add and test ST_Delaunay
- Add and test ST_ConstrainedDelaunay
- Add missing documentation
…ggregate functions

SparkSqlDialect also supports `WITH CUBE` and `WITH ROLLUP`, but we prefer the `ROLLUP` and `CUBE` aggregate functions since they are in the SQL standard.

Close apache#2994
… ending in 0

Add unit test for TimestampString.
@JiajunBernoulli JiajunBernoulli merged commit 74bc025 into main Oct 25, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.