Re: [PR] [SPARK-47210][SQL] Addition of implicit casting without indeterminate support [spark]

2024-04-01 Thread via GitHub
mihailom-db commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1547242430 ## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala: ## @@ -0,0 +1,129 @@ +/* + * Licensed to the Apache Software Foundat

Re: [PR] [SPARK-47669][SQL][CONNECT][PYTHON] Add `Column.try_cast` [spark]

2024-04-01 Thread via GitHub
zhengruifeng commented on code in PR #45796: URL: https://github.com/apache/spark/pull/45796#discussion_r1547242375 ## sql/core/src/main/scala/org/apache/spark/sql/Column.scala: ## @@ -1222,6 +1222,43 @@ class Column(val expr: Expression) extends Logging { */ def cast(to:

Re: [PR] [SPARK-47210][SQL] Addition of implicit casting without indeterminate support [spark]

2024-04-01 Thread via GitHub
cloud-fan commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1547239943 ## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala: ## @@ -702,26 +707,39 @@ abstract class TypeCoercionBase { }.getOrE

Re: [PR] [SPARK-47669][SQL][CONNECT][PYTHON] Add `Column.try_cast` [spark]

2024-04-01 Thread via GitHub
zhengruifeng commented on code in PR #45796: URL: https://github.com/apache/spark/pull/45796#discussion_r1547238526 ## connector/connect/common/src/main/protobuf/spark/connect/expressions.proto: ## @@ -137,6 +137,13 @@ message Expression { } } + enum EvalMode { +E

Re: [PR] [SPARK-47210][SQL] Addition of implicit casting without indeterminate support [spark]

2024-04-01 Thread via GitHub
mihailom-db commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1547226617 ## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala: ## @@ -702,26 +707,39 @@ abstract class TypeCoercionBase { }.getO

Re: [PR] [SPARK-47686][SQL][TESTS] Use `=!=` instead of `!==` in `JoinHintSuite` [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun commented on PR #45812: URL: https://github.com/apache/spark/pull/45812#issuecomment-2031197623 Merged to master. -- 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 commen

Re: [PR] [SPARK-47686][SQL][TESTS] Use `=!=` instead of `!==` in `JoinHintSuite` [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun closed pull request #45812: [SPARK-47686][SQL][TESTS] Use `=!=` instead of `!==` in `JoinHintSuite` URL: https://github.com/apache/spark/pull/45812 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL abo

Re: [PR] [SPARK-47210][SQL] Addition of implicit casting without indeterminate support [spark]

2024-04-01 Thread via GitHub
mihailom-db commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1547226867 ## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala: ## @@ -702,26 +707,39 @@ abstract class TypeCoercionBase { }.getO

Re: [PR] [SPARK-47686][SQL][TESTS] Use `=!=` instead of `!==` in `JoinHintSuite` [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun commented on PR #45812: URL: https://github.com/apache/spark/pull/45812#issuecomment-2031196546 Thank you! -- 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

Re: [PR] [SPARK-47210][SQL] Addition of implicit casting without indeterminate support [spark]

2024-04-01 Thread via GitHub
cloud-fan commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1547210423 ## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala: ## @@ -0,0 +1,129 @@ +/* + * Licensed to the Apache Software Foundatio

Re: [PR] [SPARK-47210][SQL] Addition of implicit casting without indeterminate support [spark]

2024-04-01 Thread via GitHub
mihailom-db commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1547201438 ## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala: ## @@ -0,0 +1,129 @@ +/* + * Licensed to the Apache Software Foundat

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547200600 ## sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/StatefulProcessorHandleSuite.scala: ## @@ -48,7 +49,7 @@ class StatefulProcessorHandleSui

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547198717 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ValueStateImplWithTTL.scala: ## @@ -0,0 +1,242 @@ +/* + * Licensed to the Apache Software Found

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547199470 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ValueStateImplWithTTL.scala: ## @@ -0,0 +1,242 @@ +/* + * Licensed to the Apache Software Found

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547198338 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ValueStateImplWithTTL.scala: ## @@ -0,0 +1,242 @@ +/* + * Licensed to the Apache Software Found

Re: [PR] [SPARK-47210][SQL] Addition of implicit casting without indeterminate support [spark]

2024-04-01 Thread via GitHub
cloud-fan commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1547197835 ## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala: ## @@ -702,26 +707,39 @@ abstract class TypeCoercionBase { }.getOrE

Re: [PR] [SPARK-47210][SQL] Addition of implicit casting without indeterminate support [spark]

2024-04-01 Thread via GitHub
cloud-fan commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1547196013 ## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala: ## @@ -0,0 +1,129 @@ +/* + * Licensed to the Apache Software Foundatio

Re: [PR] [SPARK-47653][SS] Add support for negative numeric types and range scan key encoder [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45778: URL: https://github.com/apache/spark/pull/45778#discussion_r1547194931 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateEncoder.scala: ## @@ -206,19 +208,24 @@ class PrefixKeyScanStateEncoder( *

Re: [PR] [SPARK-47210][SQL] Addition of implicit casting without indeterminate support [spark]

2024-04-01 Thread via GitHub
cloud-fan commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1547193589 ## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala: ## @@ -0,0 +1,129 @@ +/* + * Licensed to the Apache Software Foundatio

Re: [PR] [SPARK-47653][SS] Add support for negative numeric types and range scan key encoder [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45778: URL: https://github.com/apache/spark/pull/45778#discussion_r1547191718 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateEncoder.scala: ## @@ -276,53 +283,113 @@ class RangeKeyScanStateEncoder(

Re: [PR] [SPARK-47210][SQL] Addition of implicit casting without indeterminate support [spark]

2024-04-01 Thread via GitHub
cloud-fan commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1547191461 ## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala: ## @@ -0,0 +1,129 @@ +/* + * Licensed to the Apache Software Foundatio

Re: [PR] [SPARK-47686][SQL][TESTS] Use `=!=` instead of `!==` in `JoinHintSuite` [spark]

2024-04-01 Thread via GitHub
LuciferYang commented on code in PR #45812: URL: https://github.com/apache/spark/pull/45812#discussion_r1547191432 ## sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala: ## @@ -695,11 +695,11 @@ class JoinHintSuite extends PlanTest with SharedSparkSession with Ada

Re: [PR] [SPARK-47686][SQL][TESTS] Use `=!=` instead of `!==` in `JoinHintSuite` [spark]

2024-04-01 Thread via GitHub
LuciferYang commented on code in PR #45812: URL: https://github.com/apache/spark/pull/45812#discussion_r1547190468 ## sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala: ## @@ -695,11 +695,11 @@ class JoinHintSuite extends PlanTest with SharedSparkSession with Ada

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547189404 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ValueStateImpl.scala: ## @@ -16,39 +16,45 @@ */ package org.apache.spark.sql.execution.strea

Re: [PR] [SPARK-47210][SQL] Addition of implicit casting without indeterminate support [spark]

2024-04-01 Thread via GitHub
cloud-fan commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1547189187 ## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala: ## @@ -0,0 +1,129 @@ +/* + * Licensed to the Apache Software Foundatio

Re: [PR] [SPARK-47653][SS] Add support for negative numeric types and range scan key encoder [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45778: URL: https://github.com/apache/spark/pull/45778#discussion_r1547188291 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateEncoder.scala: ## @@ -276,53 +283,113 @@ class RangeKeyScanStateEncoder( range

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547187515 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/TTLState.scala: ## @@ -0,0 +1,193 @@ +/* + * Licensed to the Apache Software Foundation (ASF) u

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547187515 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/TTLState.scala: ## @@ -0,0 +1,193 @@ +/* + * Licensed to the Apache Software Foundation (ASF) u

Re: [PR] [SPARK-47686][SQL][TESTS] Use `=!=` instead of `!==` in `JoinHintSuite` [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun commented on code in PR #45812: URL: https://github.com/apache/spark/pull/45812#discussion_r1547187101 ## sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala: ## @@ -695,11 +695,11 @@ class JoinHintSuite extends PlanTest with SharedSparkSession with A

Re: [PR] [SPARK-47686][SQL][TESTS] Use `=!=` instead of `!==` in `JoinHintSuite` [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun commented on code in PR #45812: URL: https://github.com/apache/spark/pull/45812#discussion_r1547186743 ## sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala: ## @@ -695,11 +695,11 @@ class JoinHintSuite extends PlanTest with SharedSparkSession with A

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547185002 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StatefulProcessorHandleImpl.scala: ## @@ -77,14 +78,23 @@ class StatefulProcessorHandleImpl(

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on PR #45808: URL: https://github.com/apache/spark/pull/45808#issuecomment-2031144226 > @panbingkun Thanks for the work. LGTM except some minor comments. Done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547183958 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StateTypesEncoderUtils.scala: ## @@ -49,12 +54,17 @@ object StateKeyValueRowSchema { class Sta

Re: [PR] [SPARK-45265][SQL] Supporting Hive 4.0 Metastore [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun commented on PR #45801: URL: https://github.com/apache/spark/pull/45801#issuecomment-2031142759 Sorry guys, @HyukjinKwon and @attilapiros . It seems to require more efforts than I thought. I'll revisit this later in this week. -- This is an automated message from the A

[PR] [SPARK-47686][SQL][TESTS] Use `=!=` instead of `!==` in `JoinHintSuite` [spark]

2024-04-01 Thread via GitHub
LuciferYang opened a new pull request, #45812: URL: https://github.com/apache/spark/pull/45812 ### What changes were proposed in this pull request? This pr use `=!=` instead of `!==` in `JoinHintSuite`. `!==` is a deprecated API since 2.0.0, and its test already exists in `DeprecatedAPIS

Re: [PR] [SPARK-47653][SS] Add support for negative numeric types and range scan key encoder [spark]

2024-04-01 Thread via GitHub
anishshri-db commented on code in PR #45778: URL: https://github.com/apache/spark/pull/45778#discussion_r1547174481 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateEncoder.scala: ## @@ -283,45 +286,79 @@ class RangeKeyScanStateEncoder( //

Re: [PR] [SPARK-47685][SQL] Restore the support for `Stream` type in `Dataset#groupBy` [spark]

2024-04-01 Thread via GitHub
LuciferYang commented on PR #45811: URL: https://github.com/apache/spark/pull/45811#issuecomment-2031125874 cc @dongjoon-hyun -- 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

Re: [PR] [SPARK-47685][SQL] Restore the support for `Stream` type in `Dataset#groupBy` [spark]

2024-04-01 Thread via GitHub
LuciferYang commented on code in PR #45811: URL: https://github.com/apache/spark/pull/45811#discussion_r1547170083 ## sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala: ## @@ -1666,11 +1666,17 @@ class DataFrameAggregateSuite extends QueryTest asser

Re: [PR] [SPARK-47684][SQL] Postgres: Map length unspecified bpchar to StringType [spark]

2024-04-01 Thread via GitHub
yaooqinn commented on code in PR #45810: URL: https://github.com/apache/spark/pull/45810#discussion_r1547169844 ## connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/PostgresIntegrationSuite.scala: ## @@ -389,24 +390,25 @@ class PostgresIntegrationSuite

Re: [PR] [SPARK-47685][SQL] Restore the support for `Stream` type in `Dataset#groupBy` [spark]

2024-04-01 Thread via GitHub
LuciferYang commented on code in PR #45811: URL: https://github.com/apache/spark/pull/45811#discussion_r1547169228 ## sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala: ## @@ -1666,11 +1666,17 @@ class DataFrameAggregateSuite extends QueryTest asser

Re: [PR] [SPARK-47685][SQL] Restore the support for `Stream` type in `Dataset#groupBy` [spark]

2024-04-01 Thread via GitHub
LuciferYang commented on code in PR #45811: URL: https://github.com/apache/spark/pull/45811#discussion_r1547169054 ## sql/core/src/main/scala/org/apache/spark/sql/RelationalGroupedDataset.scala: ## @@ -58,10 +58,12 @@ class RelationalGroupedDataset protected[sql]( import Rela

[PR] [SPARK-47685][SQL] Restore the support for `Stream` type in `Dataset#groupBy` [spark]

2024-04-01 Thread via GitHub
LuciferYang opened a new pull request, #45811: URL: https://github.com/apache/spark/pull/45811 ### What changes were proposed in this pull request? When I reviewed the changes in SPARK-45685, I found an old user case that is no longer supported: ```scala Seq(1).toDF("id").groupB

Re: [PR] [SPARK-47684][SQL] Postgres: Map length unspecified bpchar to StringType [spark]

2024-04-01 Thread via GitHub
yaooqinn commented on code in PR #45810: URL: https://github.com/apache/spark/pull/45810#discussion_r1547165738 ## connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/PostgresIntegrationSuite.scala: ## @@ -389,24 +390,25 @@ class PostgresIntegrationSuite

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547159013 ## resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala: ## @@ -33,7 +33,7 @@ import org.apache.spark.

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on PR #45808: URL: https://github.com/apache/spark/pull/45808#issuecomment-203986 I will update `soon` so that we can proceed smoothly with the following work. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547158917 ## common/utils/src/test/scala/org/apache/spark/util/MDCSuite.scala: ## @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more +

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547158697 ## common/utils/src/main/scala/org/apache/spark/internal/LogKey.scala: ## @@ -21,5 +21,9 @@ package org.apache.spark.internal * All structured logging keys should

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547156682 ## common/utils/src/main/scala/org/apache/spark/internal/LogKey.scala: ## @@ -21,5 +21,9 @@ package org.apache.spark.internal * All structured logging keys should

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547156577 ## common/utils/src/test/scala/org/apache/spark/util/StructuredLoggingSuite.scala: ## @@ -57,12 +58,14 @@ trait LoggingSuiteBase def msgWithMDCAndException: Log

Re: [PR] [SPARK-47676][BUILD] Clean up the removed `VersionsSuite` references [spark]

2024-04-01 Thread via GitHub
LuciferYang commented on PR #45800: URL: https://github.com/apache/spark/pull/45800#issuecomment-2031106167 late LGTM -- 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 uns

Re: [PR] [SPARK-45265][SQL] Supporting Hive 4.0 Metastore [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun commented on PR #45801: URL: https://github.com/apache/spark/pull/45801#issuecomment-2031104363 Thank you, @attilapiros . I addressed your comment and fixed the patch according to HIVE-21078 and HIVE-21164. It seems that there are more API changes from Hive side. I'm still l

Re: [PR] [SPARK-47684][SQL] Postgres: Map length unspecified bpchar to StringType [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun commented on code in PR #45810: URL: https://github.com/apache/spark/pull/45810#discussion_r1547154074 ## connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/PostgresIntegrationSuite.scala: ## @@ -389,24 +390,25 @@ class PostgresIntegrationS

Re: [PR] [SPARK-47684][SQL] Postgres: Map length unspecified bpchar to StringType [spark]

2024-04-01 Thread via GitHub
yaooqinn commented on code in PR #45810: URL: https://github.com/apache/spark/pull/45810#discussion_r1547147771 ## connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/PostgresIntegrationSuite.scala: ## @@ -389,24 +390,25 @@ class PostgresIntegrationSuite

Re: [PR] [SPARK-47684][SQL] Postgres: Map length unspecified bpchar to StringType [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun commented on code in PR #45810: URL: https://github.com/apache/spark/pull/45810#discussion_r1547144486 ## connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/PostgresIntegrationSuite.scala: ## @@ -389,24 +390,25 @@ class PostgresIntegrationS

Re: [PR] [SPARK-47669][SQL][CONNECT][PYTHON] Add `Column.try_cast` [spark]

2024-04-01 Thread via GitHub
ueshin commented on code in PR #45796: URL: https://github.com/apache/spark/pull/45796#discussion_r1547142056 ## connector/connect/common/src/main/protobuf/spark/connect/expressions.proto: ## @@ -137,6 +137,13 @@ message Expression { } } + enum EvalMode { +EVAL_MO

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547143112 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/TTLState.scala: ## @@ -0,0 +1,193 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under o

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547142763 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StatefulProcessorHandleImpl.scala: ## @@ -185,6 +202,16 @@ class StatefulProcessorHandleImpl( ti

Re: [PR] [SPARK-47665][SQL] Use SMALLINT to Write ShortType to MYSQL [spark]

2024-04-01 Thread via GitHub
yaooqinn commented on PR #45789: URL: https://github.com/apache/spark/pull/45789#issuecomment-2031086285 Thank you @dongjoon-hyun. Merged to master. PS: The impact on existing workloads is trivial, as users are still able to write shorts to pre-defined int-tables -- This is an

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547142418 ## sql/api/src/main/scala/org/apache/spark/sql/streaming/ValueState.scala: ## @@ -42,8 +43,22 @@ private[sql] trait ValueState[S] extends Serializable { /** Get the s

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547141805 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/TTLState.scala: ## @@ -0,0 +1,193 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under o

Re: [PR] [SPARK-47665][SQL] Use SMALLINT to Write ShortType to MYSQL [spark]

2024-04-01 Thread via GitHub
yaooqinn closed pull request #45789: [SPARK-47665][SQL] Use SMALLINT to Write ShortType to MYSQL URL: https://github.com/apache/spark/pull/45789 -- 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 s

[PR] [SPARK-47684][SQL] Postgres: Map length unspecified bpchar to StringType [spark]

2024-04-01 Thread via GitHub
yaooqinn opened a new pull request, #45810: URL: https://github.com/apache/spark/pull/45810 ### What changes were proposed in this pull request? This PR maps length unspecified bpchar to StringType for Postgres. Length unspecified bpchar represents variable unlimited chara

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547140572 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/TTLState.scala: ## @@ -0,0 +1,193 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under o

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547140114 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StatefulProcessorHandleImpl.scala: ## @@ -77,14 +78,23 @@ class StatefulProcessorHandleImpl( sto

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547139448 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StatefulProcessorHandleImpl.scala: ## @@ -103,22 +113,29 @@ class StatefulProcessorHandleImpl( p

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
gengliangwang commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547137886 ## common/utils/src/test/scala/org/apache/spark/util/StructuredLoggingSuite.scala: ## @@ -57,12 +58,14 @@ trait LoggingSuiteBase def msgWithMDCAndException:

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547138671 ## common/utils/src/main/resources/error/error-classes.json: ## @@ -3565,6 +3571,19 @@ ], "sqlState" : "42802" }, + "STATEFUL_PROCESSOR_CANNOT_USE_TTL_DURA

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547138251 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ValueStateImplWithTTL.scala: ## @@ -0,0 +1,244 @@ +/* + * Licensed to the Apache Software Foundation

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
gengliangwang commented on PR #45808: URL: https://github.com/apache/spark/pull/45808#issuecomment-2031080357 @panbingkun Thanks for the work. LGTM except some minor comments. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub an

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
gengliangwang commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547135454 ## resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala: ## @@ -33,7 +33,7 @@ import org.apache.spa

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547135608 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ValueStateImpl.scala: ## @@ -16,39 +16,46 @@ */ package org.apache.spark.sql.execution.streaming

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547135223 ## sql/api/src/main/java/org/apache/spark/sql/streaming/TTLMode.java: ## @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + *

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547134400 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StateTypesEncoderUtils.scala: ## @@ -49,12 +54,17 @@ object StateKeyValueRowSchema { class StateType

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547134168 ## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StateTypesEncoderUtils.scala: ## @@ -49,12 +54,17 @@ object StateKeyValueRowSchema { class StateType

Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]

2024-04-01 Thread via GitHub
sahnib commented on code in PR #45674: URL: https://github.com/apache/spark/pull/45674#discussion_r1547132684 ## sql/api/src/main/scala/org/apache/spark/sql/streaming/ValueState.scala: ## @@ -42,8 +43,22 @@ private[sql] trait ValueState[S] extends Serializable { /** Get the s

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
gengliangwang commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547130360 ## common/utils/src/test/scala/org/apache/spark/util/MDCSuite.scala: ## @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or mor

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
gengliangwang commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547129698 ## common/utils/src/main/scala/org/apache/spark/internal/LogKey.scala: ## @@ -21,5 +21,9 @@ package org.apache.spark.internal * All structured logging keys shou

Re: [PR] [SPARK-47679][SQL] Use `HiveConf.getConfVars` or Hive conf names directly [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun closed pull request #45804: [SPARK-47679][SQL] Use `HiveConf.getConfVars` or Hive conf names directly URL: https://github.com/apache/spark/pull/45804 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL a

Re: [PR] [SPARK-47679][SQL] Use `HiveConf.getConfVars` or Hive conf names directly [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun commented on PR #45804: URL: https://github.com/apache/spark/pull/45804#issuecomment-2031042389 Merged to master for Apache Spark 4.0.0 -- 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

Re: [PR] [SPARK-47639] Support codegen for json_tuple. [spark]

2024-04-01 Thread via GitHub
leixm commented on PR #45765: URL: https://github.com/apache/spark/pull/45765#issuecomment-2031020720 Benchmark result: ``` [info] JSON functions: Best Time(ms) Avg Time(ms) Stdev(ms)Rate(M/s) Per Row(ns) Relative [info] ---

Re: [PR] [SPARK-47639] Support codegen for json_tuple. [spark]

2024-04-01 Thread via GitHub
leixm commented on PR #45765: URL: https://github.com/apache/spark/pull/45765#issuecomment-2031020085 I deleted below code, this ut will cause an error(Assignment conversion not possible from type "scala.collection.IterableOnce" to type "org.apache.spark.sql.catalyst.util.ArrayData"), becau

[PR] [SPARK-47664][PYTHON][CONNECT][TESTS][FOLLOW-UP] Add more tests [spark]

2024-04-01 Thread via GitHub
zhengruifeng opened a new pull request, #45809: URL: https://github.com/apache/spark/pull/45809 ### What changes were proposed in this pull request? Add more tests ### Why are the changes needed? for test coverage, to address https://github.com/apache/spark/pull/45788#discussion

Re: [PR] [SPARK-47639] Support codegen for json_tuple. [spark]

2024-04-01 Thread via GitHub
leixm commented on PR #45765: URL: https://github.com/apache/spark/pull/45765#issuecomment-2031015857 > I haven't looked at the code in detail yet, but I have two questions first: > > 1. After this PR, which test cases still cover the non-codegen code branches? The test cases related

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547095372 ## common/utils/src/test/scala/org/apache/spark/util/StructuredLoggingSuite.scala: ## @@ -57,12 +58,14 @@ trait LoggingSuiteBase def msgWithMDCAndException: Log

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547090080 ## common/utils/src/test/scala/org/apache/spark/util/StructuredLoggingSuite.scala: ## @@ -57,12 +58,14 @@ trait LoggingSuiteBase def msgWithMDCAndException: Log

Re: [PR] [SPARK-47141][CORE] Support enabling migration of shuffle data directly to external storage using config parameter. [spark]

2024-04-01 Thread via GitHub
maheshk114 commented on PR #45228: URL: https://github.com/apache/spark/pull/45228#issuecomment-2031012182 > > > I am also concerned about the performance. > > > I think the best would be if the migration of shuffle data to external storage would only kick in when the scale down is aggres

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on PR #45808: URL: https://github.com/apache/spark/pull/45808#issuecomment-2031006783 cc @gengliangwang -- 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.

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547090080 ## common/utils/src/test/scala/org/apache/spark/util/StructuredLoggingSuite.scala: ## @@ -57,12 +58,14 @@ trait LoggingSuiteBase def msgWithMDCAndException: Log

Re: [PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun commented on code in PR #45808: URL: https://github.com/apache/spark/pull/45808#discussion_r1547089486 ## common/utils/src/main/scala/org/apache/spark/internal/Logging.scala: ## @@ -29,14 +29,15 @@ import org.apache.logging.log4j.core.filter.AbstractFilter import org

[PR] [SPARK-47602][CORE] Resource managers: Migrate logError with variables to structured logging framework [spark]

2024-04-01 Thread via GitHub
panbingkun opened a new pull request, #45808: URL: https://github.com/apache/spark/pull/45808 ### What changes were proposed in this pull request? ### Why are the changes needed? ### Does this PR introduce _any_ user-facing change?

[PR] [SPARK-47682][SQL] Support cast from variant. [spark]

2024-04-01 Thread via GitHub
chenhao-db opened a new pull request, #45807: URL: https://github.com/apache/spark/pull/45807 ### What changes were proposed in this pull request? This PR allows casting from variant to another type. It has the same semantics as `variant_get` with an empty path. ### How was thi

Re: [PR] [SPARK-45265][SQL] Supporting Hive 4.0 Metastore [spark]

2024-04-01 Thread via GitHub
attilapiros commented on PR #45801: URL: https://github.com/apache/spark/pull/45801#issuecomment-2030972406 Hi @dongjoon-hyun, Thanks! I am fine either way. By the way should not we need to extend the condition with `|| version == "4.0"` here: https://github.com/apache/spa

Re: [PR] [SPARK-47679][SQL] Use `HiveConf.getConfVars` or Hive conf names directly [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun commented on PR #45804: URL: https://github.com/apache/spark/pull/45804#issuecomment-2030968203 Thank you, @yaooqinn . -- 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 c

[PR] [SPARK-47680][SQL] Add variant_schema expression. [spark]

2024-04-01 Thread via GitHub
chenhao-db opened a new pull request, #45806: URL: https://github.com/apache/spark/pull/45806 ### What changes were proposed in this pull request? This PR adds a new `VariantSchema` expression. It returns schema in the SQL format of a variant. Usage examples: ``` > SE

Re: [PR] [SPARK-47665][SQL] Use SMALLINT to Write ShortType to MYSQL [spark]

2024-04-01 Thread via GitHub
yaooqinn commented on PR #45789: URL: https://github.com/apache/spark/pull/45789#issuecomment-2030952935 Thank you @dongjoon-hyun -- 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 com

Re: [PR] [SPARK-47679][SQL] Use `HiveConf.getConfVars` or Hive conf names directly [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun commented on PR #45804: URL: https://github.com/apache/spark/pull/45804#issuecomment-2030946673 Thank you, @HyukjinKwon ! -- 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 specifi

Re: [PR] [SPARK-47551][SQL] Add variant_get expression. [spark]

2024-04-01 Thread via GitHub
cloud-fan closed pull request #45708: [SPARK-47551][SQL] Add variant_get expression. URL: https://github.com/apache/spark/pull/45708 -- 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 comm

Re: [PR] [SPARK-47551][SQL] Add variant_get expression. [spark]

2024-04-01 Thread via GitHub
cloud-fan commented on PR #45708: URL: https://github.com/apache/spark/pull/45708#issuecomment-2030916612 thanks, merging to master! -- 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 c

[PR] [SPARK-47679][SQL] Use `HiveConf.getConfVars` or Hive conf names directly [spark]

2024-04-01 Thread via GitHub
dongjoon-hyun opened a new pull request, #45804: URL: https://github.com/apache/spark/pull/45804 … ### What changes were proposed in this pull request? ### Why are the changes needed? ### Does this PR introduce _any_ user-facing change?

[PR] [SHUFFLE] [SPARK-47678] Check `spark.shuffle.readHostLocalDisk` when reading shuffle blocks [spark]

2024-04-01 Thread via GitHub
hiboyang opened a new pull request, #45803: URL: https://github.com/apache/spark/pull/45803 ### What changes were proposed in this pull request? Check `spark.shuffle.readHostLocalDisk` config to determine whether read shuffle block from same local host machine. ### Why are

  1   2   3   4   >