AMashenkov commented on code in PR #2254:
URL: https://github.com/apache/ignite-3/pull/2254#discussion_r1279269692
##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/api/ItCommonApiTest.java:
##########
@@ -123,37 +115,25 @@ public void testSessionExpiration() throws Exception {
@Test
public void checkTimestampOperations() {
String kvTblName = "tbl_all_columns_sql";
- String schemaName = "PUBLIC";
- String keyCol = "key";
- int maxTimePrecision = TemporalColumnType.MAX_TIME_PRECISION;
+ String keyCol = "KEY";
Ignite node = CLUSTER_NODES.get(0);
// TODO: https://issues.apache.org/jira/browse/IGNITE-19162 Trim all
less than millisecond information from timestamp
//String tsStr = "2023-03-29T08:22:33.005007Z";
- String tsStr = "2023-03-29T08:22:33.005Z";
+ String tsStr = "2023-03-29T08:22:33Z";
Review Comment:
There is a bug in` CatalogUtils.fromParams(ColumnParams)` method.
Precision, scale and length are set to `0` by default, but we expected using
default values described in SQL standard.
So now, table descriptor, which was built from Catalog, differs from
descriptor, which was built from Configuration.
To fix the issue, next default should be used.
```
/**
* Default TIMESTAMP type precision: microseconds.
*
* <p>SQL`16 part 2 section 6.1 syntax rule 36
*/
public static final int DEFAULT_TIMESTAMP_PRECISION = 6;
/**
* Default TIME type precision: seconds.
*
* <p>SQL`16 part 2 section 6.1 syntax rule 36
*/
public static final int DEFAULT_TIME_PRECISION = 0;
/**
* Default DECIMAL precision is implementation-defined.
*
* <p>SQL`16 part 2 section 6.1 syntax rule 25
*/
public static final int DEFAULT_DECIMAL_PRECISION = 19;
/**
* Default DECIMAL scale is implementation-defined.
*
* <p>SQL`16 part 2 section 6.1 syntax rule 25
*/
public static final int DEFAULT_DECIMAL_SCALE = 3;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]