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

Support "yyyy-MM-dd HH:mm:ss" cast Date type #20155

Closed
wants to merge 105 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
12eb3f6
Supprt "yyyy-MM-dd HH:mm:ss" cast Date type
everypp Dec 18, 2023
9964554
Merge branch 'trinodb:master' into master
everypp Dec 20, 2023
7627cd0
Merge branch 'trinodb:master' into master
everypp Dec 21, 2023
773302a
Merge branch 'trinodb:master' into master
everypp Jan 2, 2024
8268c32
Merge branch 'trinodb:master' into master
everypp Jan 9, 2024
744eafe
Remove redundant classloader wrapper from exclude_columns
findepi Dec 20, 2023
1938823
Remove redundant classloader wrapper from sequence
findepi Dec 20, 2023
82fd3bf
Remove redundant air.test.parallel property
ebyhr Dec 21, 2023
af9f8fb
Fix ConstantExpression serialization
findepi Dec 20, 2023
e73c1da
Fix TestAccessControl execution
findepi Dec 21, 2023
62d15b2
Add tracing for query start
findepi Dec 21, 2023
3fd2ca3
Fix code indentation
findepi Dec 21, 2023
6f0b468
Remove redundant PER_CLASS & CONCURRENT annotations
findepi Dec 21, 2023
c1940bf
Remove unused field from TestIcebergMetadataListing
findepi Dec 21, 2023
94c69b6
Factor out common code in TestUniformNodeSelector
dekimir Dec 15, 2023
a3b7099
Warn about unexpected task updates
dekimir Dec 21, 2023
3dd5918
Add example SQL routine for formatting topn results
nineinchnick Dec 8, 2023
79a96a0
Fix incorrectly concurrent tests
findepi Dec 21, 2023
10d173c
Set up only one concurrent query runner in TestQueryManager
findepi Dec 21, 2023
00dfc8e
Add tracing for SplitManager.getSplits
findepi Dec 21, 2023
3b8e875
Rename parameter in helper method
findepi Dec 21, 2023
00a5b99
Hide FTE tests configs
findepi Dec 20, 2023
4769b49
Fix rendering of time/timestamp with timezone type name
takezoe Dec 22, 2023
9f5ebee
Update hudi test resource for hudi_non_part_cow table
krvikash Nov 27, 2023
478b1a0
Optional check for query partition filter for Hudi
krvikash Nov 21, 2023
33c95a3
Throw IndexOutOfBoundsException in InputStream implementations
jkylling Nov 18, 2023
cbf0236
Catch exception in sendUpdate
losipiuk Dec 21, 2023
2f39185
Restore lifecycle annotations in tests
martint Dec 21, 2023
e7c1029
Adjust logging level to debug
martint Dec 22, 2023
2c5694c
Fix formatting
martint Dec 22, 2023
2b4ccfe
Remove unnecessary calls to toString()
martint Dec 22, 2023
e5f4aa0
Remove unnecessary simplification step
sopel39 Mar 10, 2023
37fd863
Do not generate redundant straddling predicates by equality inference
sopel39 Mar 10, 2023
ac9b4bc
Update JLine to 3.25.0
wendigo Dec 24, 2023
1a0ec76
Fix SQL Server DATETIMEOFFSET for old dates
adamjshook Nov 3, 2023
80ef1b9
Only log null spooling stats in FTE mode
dekimir Dec 22, 2023
513435d
Fix failing test on master
sopel39 Dec 26, 2023
de42360
Use explicit values for MaxResults in all Glue APIs
hashhar Dec 21, 2023
8fb5cc1
Add Delta table read version to connectorInfo
jkylling Dec 29, 2023
313ee5b
Fix case in RN section header
findepi Dec 29, 2023
0b578cc
Refactor IcebergSplitSource to reduce per split operations
raunaqmorarka Dec 27, 2023
c6cb2fa
Extract pruneFileScanTask in IcebergSplitSource
raunaqmorarka Dec 27, 2023
6693344
Avoid unnecessary string to slice conversion
raunaqmorarka Dec 28, 2023
527bbce
Assert position count of page instead of individual blocks
findinpath Dec 29, 2023
9c62dd6
Refactor test class to be able to host eventually multiple tests
findinpath Dec 27, 2023
b83a9f9
Short circuit page source in case of partition mismatch
findinpath Dec 22, 2023
57e0cbd
Strip the partition columns domains from the effective predicate
findinpath Dec 27, 2023
ba27ff8
Unignore re2j dependency conflicts
findepi Dec 29, 2023
20576e4
Prune dependency management for alluxio-shaded-client
findepi Dec 29, 2023
5c274bb
Put related modernizer exclusions together
findepi Dec 29, 2023
2bc0222
Remove unused test helper method
findepi Dec 29, 2023
9f03374
Mark wether a PlanFragement is contains TableScanNode or not
XuPengfei-1020 Dec 20, 2023
08278b3
fix ST_Centroid and ST_Buffer for tiny geometries
cshao239 Dec 28, 2023
3e05d00
Use the effective predicate when doing partition matching
findinpath Jan 2, 2024
58b56c3
Remove Deprecated annotation from parquet.ignore-statistics
raunaqmorarka Dec 27, 2023
f8cec84
Add parquet_ignore_statistics session property to iceberg
raunaqmorarka Dec 27, 2023
7c69b99
Add parquet_ignore_statistics session property to delta lake
raunaqmorarka Dec 27, 2023
04e7401
Add documentation for parquet.ignore-statistics
raunaqmorarka Dec 27, 2023
9ce4ab4
Update docs for java 17.0.5
Chaho12 Jan 3, 2024
33cfa78
Increase threshold for stalled FTE scheduler logging
losipiuk Dec 6, 2023
8d08968
Decouple debug logging frequency and scheduler stalled time
losipiuk Dec 14, 2023
2789925
Sometimes EventListenerMangager.queryCompleted() called too early
dominikzalewski Dec 27, 2023
cf533cf
Update to Iceberg 1.4.3
Fokko Dec 21, 2023
13d5a2f
Add scaffolding for unit testing dynamic filtering
findinpath Jan 2, 2024
8bfcc2d
Short circuit page source in case of partition mismatch
findinpath Jan 2, 2024
5a6180e
Fix TestRedshiftTypeMapping
ebyhr Jan 4, 2024
3244a12
Add DomainUserDefinedPredicate#toString
raunaqmorarka Jan 3, 2024
bf093a8
Remove unnecessary forceTestNgToRespectSingleThreaded
raunaqmorarka Jan 4, 2024
74170b5
Rename io.trino.plugin.hive.parquet.TestParquetReader
raunaqmorarka Jan 4, 2024
e458661
Rename TestParquetReaderMemoryUsage
raunaqmorarka Jan 3, 2024
313e2f3
Fix handling of pruned parquet row groups with column indexes
raunaqmorarka Jan 3, 2024
1d6388b
Upgrade required JVM version to 17.0.8
wendigo Jan 4, 2024
bb1d245
Update AWS SDK v1 to 1.12.630
wendigo Jan 4, 2024
fd27138
Update AWS SDK v2 to 2.22.10
wendigo Jan 4, 2024
8bd6cb3
Update JDBI to 3.43.0
wendigo Jan 4, 2024
368375a
Update flywaydb to 10.4.1
wendigo Jan 4, 2024
4092ebf
Update Jetty to 11.0.19
wendigo Jan 4, 2024
4e4904c
Update swagger to 2.2.20
wendigo Jan 4, 2024
9878a65
Update datasketches-java to 5.0.1
wendigo Jan 4, 2024
1eac7af
Update keycloak to 23.0.3
wendigo Jan 4, 2024
3d1e67f
Update databricks-jdbc to 2.6.36
wendigo Jan 4, 2024
e2df55c
Update byte-buddy to 1.14.11
wendigo Jan 4, 2024
2ffa9ad
Update javassist to 3.30.2-GA
wendigo Jan 4, 2024
5eb1de4
Update MariaDB driver to 3.3.2
wendigo Jan 4, 2024
bb93594
Update s3mock-testcontainers to 3.3.0
wendigo Jan 4, 2024
fa40c54
Updater oauth2-oidc-sdk to 11.9
wendigo Jan 4, 2024
5193977
Update checker-equal to 3.42.0
wendigo Jan 4, 2024
57faa05
Remove redundant ? from SHOW COLUMNS in SqlBase.g4
ebyhr Jan 4, 2024
2537208
Specify table name in testPartitionProjectionIgnore
ebyhr Jan 5, 2024
8effc54
Fixes failure when building trino-server alone
athultr1997 Jan 1, 2024
3b075e6
Increase stale operations count
mosabua Dec 29, 2023
b435e36
Allow union data to conform to smaller union
jklamer Dec 27, 2023
8c3f9d6
Update oshi-core to 6.4.10
wendigo Jan 5, 2024
509edac
Update grpc-bom to 1.60.1
wendigo Jan 5, 2024
c7e3534
Update joda-time to 2.12.6
wendigo Jan 8, 2024
6ad83e9
Update arrow to 14.0.2
wendigo Jan 8, 2024
1b7363f
Detect leaked containers when running with JUnit
findepi Jan 8, 2024
2814348
Return empty table list in Iceberg REST Catalog when invalid namespac…
amogh-jahagirdar Nov 28, 2023
d2ee3a9
Fix typo in stalebot config
mosabua Jan 8, 2024
91de738
Require JDK 21 to run Trino
wendigo Dec 4, 2023
d9f4d60
Use isDynamicFilterFunction in ConnectorExpressionTranslator
raunaqmorarka Jan 8, 2024
dbea9bd
test
Jan 30, 2024
7460efc
test1
Jan 30, 2024
38b8ded
Merge remote-tracking branch 'everypp/master' into master_every
Jan 30, 2024
56535a3
test2
Jan 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import static java.lang.Character.MAX_CODE_POINT;
import static java.lang.Character.SURROGATE;
import static java.lang.Math.abs;
import static java.lang.Math.sqrt;
import static java.lang.Math.toIntExact;

/**
Expand Down Expand Up @@ -123,6 +124,7 @@ public static long spaceTrimmedLength(@SqlType("varchar") Slice slice)
@SqlType("varchar(x)")
public static Slice replace(@SqlType("varchar(x)") Slice str, @SqlType("varchar(y)") Slice search)
{
sqrt(str.length());
return replace(str, search, Slices.EMPTY_SLICE);
}

Expand Down Expand Up @@ -202,6 +204,15 @@ public static Slice reverse(@SqlType("varchar(x)") Slice slice)
return SliceUtf8.reverse(slice);
}

@Description("Reverse all code points in a given string")
@ScalarFunction
@LiteralParameters("x")
@SqlType("varchar(x)")
public static Slice charReverse(@SqlType("varchar(x)") Slice slice)
{
return SliceUtf8.reverse(slice);
}

@Description("Returns index of first occurrence of a substring (or 0 if not found)")
@ScalarFunction("strpos")
@LiteralParameters({"x", "y"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static long castFromVarchar(@SqlType("varchar(x)") Slice value)
// Note: update DomainTranslator.Visitor.createVarcharCastToDateComparisonExtractionResult whenever CAST behavior changes.

try {
return parseDate(trim(value).toStringUtf8());
return parseDate(trim(value).toStringUtf8().split(" ")[0]);
}
catch (IllegalArgumentException | ArithmeticException | DateTimeException e) {
throw new TrinoException(INVALID_CAST_ARGUMENT, "Value cannot be cast to date: " + value.toStringUtf8(), e);
Expand Down
Loading