Skip to content

Commit

Permalink
Update issue links to correct project location
Browse files Browse the repository at this point in the history
wendigo authored and findepi committed Oct 13, 2021

Unverified

This user has not yet uploaded their public signing key.
1 parent c8b861c commit 4893b5c
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -263,7 +263,7 @@ public void testPredicateTypeWithCoercion()
TupleDomain.all(),
Optional.of(ImmutableList.of(DESTINATION_COLUMN_HANDLE_B, DESTINATION_COLUMN_HANDLE_A)))::equals,
// PushProjectionIntoTableScan does not preserve enforced constraint
// (issue: https://github.com/prestosql/presto/issues/6029)
// (issue: https://github.com/trinodb/trino/issues/6029)
TupleDomain.all(),
ImmutableMap.of(
"DEST_COL_B", DESTINATION_COLUMN_HANDLE_B::equals,
Original file line number Diff line number Diff line change
@@ -7870,46 +7870,46 @@ public void testSelectFromPrestoViewReferencingHiveTableWithTimestamps()

assertThat(query(defaultSession, "SELECT ts FROM " + prestoViewNameDefault)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123'");

// TODO(https://github.com/prestosql/presto/issues/6295) Presto view schema is fixed on creation
// TODO(https://github.com/trinodb/trino/issues/6295) Presto view schema is fixed on creation
// should be: assertThat(query(defaultSession, "SELECT ts FROM hive_timestamp_nanos.tpch." + prestoViewNameDefault)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123456789'")
assertThat(query(defaultSession, "SELECT ts FROM hive_timestamp_nanos.tpch." + prestoViewNameDefault)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123'");

assertThat(query(millisSession, "SELECT ts FROM " + prestoViewNameDefault)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123'");
assertThat(query(millisSession, "SELECT ts FROM hive_timestamp_nanos.tpch." + prestoViewNameDefault)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123'");

// TODO(https://github.com/prestosql/presto/issues/6295) Presto view schema is fixed on creation
// TODO(https://github.com/trinodb/trino/issues/6295) Presto view schema is fixed on creation
// should be: assertThat(query(nanosSessions, "SELECT ts FROM " + prestoViewNameDefault)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123456789'")
assertThat(query(nanosSessions, "SELECT ts FROM " + prestoViewNameDefault)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123'");

// TODO(https://github.com/prestosql/presto/issues/6295) Presto view schema is fixed on creation
// TODO(https://github.com/trinodb/trino/issues/6295) Presto view schema is fixed on creation
// should be: assertThat(query(nanosSessions, "SELECT ts FROM hive_timestamp_nanos.tpch." + prestoViewNameDefault)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123456789'")
assertThat(query(nanosSessions, "SELECT ts FROM hive_timestamp_nanos.tpch." + prestoViewNameDefault)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123'");

// Presto view created with config property set to MILLIS and session property set to NANOS
String prestoViewNameNanos = "presto_view_ts_nanos_" + randomTableSuffix();
assertUpdate(nanosSessions, "CREATE VIEW " + prestoViewNameNanos + " AS SELECT * FROM " + tableName);

// TODO(https://github.com/prestosql/presto/issues/6295) Presto view schema is fixed on creation
// TODO(https://github.com/trinodb/trino/issues/6295) Presto view schema is fixed on creation
// should be: assertThat(query(defaultSession, "SELECT ts FROM " + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123'")
assertThat(query(defaultSession, "SELECT ts FROM " + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123000000'");

// TODO(https://github.com/prestosql/presto/issues/6295) Presto view schema is fixed on creation
// TODO(https://github.com/trinodb/trino/issues/6295) Presto view schema is fixed on creation
// should be: assertThat(query(defaultSession, "SELECT ts FROM hive_timestamp_nanos.tpch." + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123456789'")
assertThat(query(defaultSession, "SELECT ts FROM hive_timestamp_nanos.tpch." + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123000000'");

// TODO(https://github.com/prestosql/presto/issues/6295) Presto view schema is fixed on creation
// TODO(https://github.com/trinodb/trino/issues/6295) Presto view schema is fixed on creation
// should be: assertThat(query(millisSession, "SELECT ts FROM " + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123'")
assertThat(query(millisSession, "SELECT ts FROM " + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123000000'");

// TODO(https://github.com/prestosql/presto/issues/6295) Presto view schema is fixed on creation
// TODO(https://github.com/trinodb/trino/issues/6295) Presto view schema is fixed on creation
// should be: assertThat(query(millisSession, "SELECT ts FROM hive_timestamp_nanos.tpch." + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123'")
assertThat(query(millisSession, "SELECT ts FROM hive_timestamp_nanos.tpch." + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123000000'");

// TODO(https://github.com/prestosql/presto/issues/6295) Presto view schema is fixed on creation
// TODO(https://github.com/trinodb/trino/issues/6295) Presto view schema is fixed on creation
// should be: assertThat(query(nanosSessions, "SELECT ts FROM " + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123456789'")
assertThat(query(nanosSessions, "SELECT ts FROM " + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123000000'");

// TODO(https://github.com/prestosql/presto/issues/6295) Presto view schema is fixed on creation
// TODO(https://github.com/trinodb/trino/issues/6295) Presto view schema is fixed on creation
// should be: assertThat(query(nanosSessions, "SELECT ts FROM hive_timestamp_nanos.tpch." + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123456789'")
assertThat(query(nanosSessions, "SELECT ts FROM hive_timestamp_nanos.tpch." + prestoViewNameNanos)).matches("VALUES TIMESTAMP '1990-01-02 12:13:14.123000000'");
}
Original file line number Diff line number Diff line change
@@ -406,7 +406,7 @@ public void testTimestampHiveView()

assertThat(query("SELECT CAST(ts AS varchar) FROM timestamp_hive_view")).containsOnly(row("1990-01-02 12:13:14.123"));
assertThatThrownBy(
// TODO(https://github.com/prestosql/presto/issues/6295) it is not possible to query Hive view with timestamps if hive.timestamp-precision=NANOSECONDS
// TODO(https://github.com/trinodb/trino/issues/6295) it is not possible to query Hive view with timestamps if hive.timestamp-precision=NANOSECONDS
() -> assertThat(query("SELECT CAST(ts AS varchar) FROM hive_timestamp_nanos.default.timestamp_hive_view")).containsOnly(row("1990-01-02 12:13:14.123456789"))
).hasMessageContaining("timestamp(9) projected from query view at position 0 cannot be coerced to column [ts] of type timestamp(3) stored in view definition");

@@ -415,18 +415,18 @@ public void testTimestampHiveView()

assertThat(query("SELECT CAST(ts AS varchar) FROM timestamp_hive_view")).containsOnly(row("1990-01-02 12:13:14.123"));
assertThatThrownBy(
// TODO(https://github.com/prestosql/presto/issues/6295) it is not possible to query Hive view with timestamps if hive.timestamp-precision=NANOSECONDS
// TODO(https://github.com/trinodb/trino/issues/6295) it is not possible to query Hive view with timestamps if hive.timestamp-precision=NANOSECONDS
() -> assertThat(query("SELECT CAST(ts AS varchar) FROM hive_timestamp_nanos.default.timestamp_hive_view")).containsOnly(row("1990-01-02 12:13:14.123"))
).hasMessageContaining("timestamp(9) projected from query view at position 0 cannot be coerced to column [ts] of type timestamp(3) stored in view definition");

setSessionProperty("hive.timestamp_precision", "'NANOSECONDS'");
setSessionProperty("hive_timestamp_nanos.timestamp_precision", "'NANOSECONDS'");

// TODO(https://github.com/prestosql/presto/issues/6295) timestamp_precision has no effect on Hive views
// TODO(https://github.com/trinodb/trino/issues/6295) timestamp_precision has no effect on Hive views
// should be: assertThat(query("SELECT CAST(ts AS varchar) FROM timestamp_hive_view")).containsOnly(row("1990-01-02 12:13:14.123456789"))
assertThat(query("SELECT CAST(ts AS varchar) FROM timestamp_hive_view")).containsOnly(row("1990-01-02 12:13:14.123"));
assertThatThrownBy(
// TODO(https://github.com/prestosql/presto/issues/6295) it is not possible to query Hive view with timestamps if hive.timestamp-precision=NANOSECONDS
// TODO(https://github.com/trinodb/trino/issues/6295) it is not possible to query Hive view with timestamps if hive.timestamp-precision=NANOSECONDS
() -> assertThat(query("SELECT CAST(ts AS varchar) FROM hive_timestamp_nanos.default.timestamp_hive_view")).containsOnly(row("1990-01-02 12:13:14.123456789"))
).hasMessageContaining("timestamp(9) projected from query view at position 0 cannot be coerced to column [ts] of type timestamp(3) stored in view definition");
}

0 comments on commit 4893b5c

Please sign in to comment.