forked from apache/calcite
-
Notifications
You must be signed in to change notification settings - Fork 0
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 5489 druid #16
Merged
Merged
Test 5489 druid #16
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ing intersect keys between target keys and group keys
…Calc and LogicalTableModify
…rom 'LHS.C1 = RHS.C1 AND LHS.C2 = RHS.C1' Cosmetic fix-ups by Chunwei Lei. Close apache#2761
Create an immutable version of class ListSqlOperatorTable, to be created via SqlOperatorTables.of. class ListSqlOperatorTable still exists but its constructors and add(SqlOperator) methods are deprecated. We hope that people will create immutable operator tables most of the time. Refactor MockSqlOperatorTable to be immutable. Methods that mutate the table, such as addRamp, are replaced by methods that return a copy. When creating a ChainedSqlOperatorTable, flatten constituent tables that are a ChainedSqlOperatorTable, and remove constituent tables that are immutable and empty.
Allow comma only at top level in FROM clause. Add new join operator, COMMA-JOIN, with slightly lower precedence than JOIN, to that unparsing works correctly. Move test case from JdbcTest to join.iq. Includes changes from PR apache#1204, authored by Muhammad Gelbana <[email protected]> Close apache#1204 Close apache#2820 Co-authored-by: Muhammad Gelbana <[email protected]>
Partial revert of deduplication in LogicalTableFunctionScan (CALCITE-4673) since the deduplication in Project is more general and covers the previous use-case as well. Close apache#2825
Syntax is enabled if SqlConformance.isOffsetLimitAllowed() returns true. Refactor parser: * Rename startCount to offsetFetch (based on the standard names of the clauses). Extract FETCH into its own method. * Disallow FETCH if parser has already seen LIMIT. Close apache#2768
…uery dialect Before this change, the expression DATE '2018-02-17' fails to parse in BigQuery dialect because the parser requires a <QUOTED_STRING> token and actually sees a <BIG_QUERY_QUOTED_STRING> token. Similarly TIME, TIMESTAMP, LITERAL literals. After this change, the above single-quoted form succeeds, as does the double-quoted form like this: DATE "2018-02-17" In SqlParserUtil, the methods parseDateLiteral, parseTimeLiteral, parseTimestampLiteral and parseIntervalLiteral expected a quoted string as an argument (e.g. "'2018-02-17'") and now expect just the value (e.g. "2018-02-17'"). Callers should now call parseString on the argument first. Close apache#2823
…ore than two items when SqlDialect#supportsAliasedValues is false
…XTRACT, DATE_PART, DATEADD, DATEDIFF and similar functions Time unit abbreviations are specified in SqlParser.Config.timeUnitCodes(). Since [CALCITE-2496], EXTRACT supports MICROSECOND and NANOSECOND by default but FLOOR and CEIL do not. With this change, you could configure FLOOR and CEIL to also support those units. Close apache#2807
… if subquery uses table from left join
The following conversion does not work as expected: cast(_MAP['date'] as TIMESTAMP) The resulting date is always 1970-01-01 and only the fractional seconds are set.
…rting an array The following conversion does not work as expected: ``` cast(_MAP['arr'] as VARCHAR ARRAY) ``` This throws the following exception: ``` Caused by: java.lang.NullPointerException: componentType of ITEM($0, 'arr') at java.base/java.util.Objects.requireNonNull(Objects.java:347) at org.apache.calcite.sql2rel.StandardConvertletTable.convertCast(StandardConvertletTable.java:603) at org.apache.calcite.sql2rel.SqlNodeToRexConverterImpl.convertCall(SqlNodeToRexConverterImpl.java:59) at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:5547) at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:4711) at org.apache.calcite.sql.SqlCall.accept(SqlCall.java:161) at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:5360) at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectList(SqlToRelConverter.java:4524) at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:756) at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:677) at org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3741) at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:597) at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:257) at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:220) at org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:651) at org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:517) at org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:487) at org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:236) at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:623) at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:677) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:156) ... 67 more ```
…valent to NVL) Close apache#3013
…valent to CHAR_LENGTH) Add LENGTH() as a library function as an alias for the standard CHAR_LENGTH(). Refactor some dependencies for deprecated standard functions to avoid NullPointerException due to circular dependencies. Close apache#3011
In order to keep redshift.iq (the Quidem test for the Redshift dialect using the Babel parser) working, we ensure that the Redshift variant of DATE_TRUNC (which has arguments in a different order than the BigQuery variant) can still be handled by the parser, even though we still cannot execute it. Close apache#3009
…ed in BigQuery library) Close apache#3008
…list and group by
Considering the modules in isolation leads to some modules (e.g., testkit) reporting low coverage. The use of jacoco-report-aggregation plugin alleviates the problem by aggregating the coverage analysis from the individual modules into one unified report. While testing the changes there was one Jenkins job that got stuck and kept running for almost ~24h. To prevent similar situation in the future a 1h timeout is set in the code quality stage. Close apache#3027
…l types and Unix timestamps Close apache#2995
…ractMonths to use DateTimeUtils from Avatica
This fixes a regression introduced by [CALCITE-5423]. Close apache#3041
If the output of a parser test case is the same as its input, it now must call same().
…nto new class IntervalTest This change allows interval tests to be shared between the parser and validator test without maintaining duplicate test code.
…ons such as EXTRACT, DATE_TRUNC In OperandTypes, add strategies for matching DATE, TIME, TIMESTAMP frames; DATE and TIMESTAMP frames include ISOYEAR, WEEK(THURSDAY). Enable tests for ISOYEAR, now that the upgrade to Avatica 1.23 has brought in the fix to [CALCITE-5369], ISOYEAR in FLOOR and CEIL functions.
Literals introduced by the keyword DATE, TIME, DATETIME, TIMESTAMP, TIMESTAMP WITH LOCAL TIME ZONE are represented by the parser by new class SqlUnknownLiteral. Determining the actual type is deferred until validation time; the validator determines the actual type based on the type system's type alias map, and then validates the character string. Close apache#3036 Co-authored-by: Julian Hyde <[email protected]> Co-authored-by: Oliver Lee <[email protected]>
…tors In RelJson, add create() method and deprecate constructor; add methods withOperatorTable, withLibraryOperatorTable, withJsonBuilder to further control its behavior. Add argument to RelJsonWriter and RelJsonReader constructors to allow configuring their embedded RelJson object. Close apache#2954
…nnot convert a TIMESTAMP literal to a org.apache.calcite.avatica.util.TimeUnit Close apache#3040 Close apache#3048 Co-authored-by: Tanner Clary <[email protected]> Co-authored-by: Sergey Nuyanzin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.