PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: jmrozanec/cron-utils (java)

Issue:
Exception when set DoW as Sunday using QUARTZ definition
In order to verify the problem, replace the day of the week to Sunday on the following test 
https://github.com/jmrozanec/cron-utils/blob/0759550fa7a18067a0decd5953acd4165f0bf0ab/src/test/java/com/cronutils/model/definition/CronDefinitionBuilderTest.java#L177

Pull request:
Fix exception thrown when DoW set as Sunday using QUARTZ definition #508
It fixes the DoW to be map Sunday correctly to 1 instead of 8.
Have also included the unit test for the issue.

Fixes #508

Patch:
diff --git a/src/main/java/com/cronutils/mapper/WeekDay.java b/src/main/java/com/cronutils/mapper/WeekDay.java
index 0783ace..ea10c44 100644
--- a/src/main/java/com/cronutils/mapper/WeekDay.java
+++ b/src/main/java/com/cronutils/mapper/WeekDay.java
@@ -61,7 +61,7 @@ public class WeekDay implements Serializable {
             return mapTo(dayOfWeek, new WeekDay(targetWeekDayDefinition.getMondayDoWValue() + 1, false)) - 1;
         } else {
             //my range is 0-6. I normalize ranges, get the "one" mapping and turn result into original scale
-            return mapTo(dayOfWeek, new WeekDay(targetWeekDayDefinition.getMondayDoWValue() - 1, true)) + 1;
+            return (mapTo(dayOfWeek, new WeekDay(targetWeekDayDefinition.getMondayDoWValue() - 1, true))) % 7 + 1;
         }
     }
 


Test patch:
diff --git a/src/test/java/com/cronutils/model/definition/CronDefinitionBuilderTest.java b/src/test/java/com/cronutils/model/definition/CronDefinitionBuilderTest.java
index 1e30557..1b87a1d 100755
--- a/src/test/java/com/cronutils/model/definition/CronDefinitionBuilderTest.java
+++ b/src/test/java/com/cronutils/model/definition/CronDefinitionBuilderTest.java
@@ -186,6 +186,28 @@ public class CronDefinitionBuilderTest {
         assertEquals("0 0 12 ? * 6 *", result);
     }
 
+    /**
+     * Test for issue https://github.com/jmrozanec/cron-utils/issues/508
+     * DoW as Sunday using QUARTZ definition was going out of range [1,7]
+     */
+    @Test
+    public void testDoWProperWeekdayOffsetForSunday(){
+        CronDefinition cronDefinition = CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ);
+        CronBuilder builder = CronBuilder.cron(cronDefinition)
+                .withYear(always())
+                .withMonth(always())
+                .withDoW(on(Weekdays.SUNDAY.getWeekday(cronDefinition)))
+                .withDoM(questionMark())
+                .withHour(on(12))
+                .withMinute(on(0))
+                .withSecond(on(0));
+
+        Cron cron = builder.instance();
+        String result = cron.asString();
+
+        assertEquals("0 0 12 ? * 1 *", result);
+    }
+
     @Test
     public void testSpringSchedule(){
         CronDefinition cronDefinition = CronDefinitionBuilder.instanceDefinitionFor(CronType.SPRING);
Repository: gocql/gocql (go)

Issue:
Metadata for smallint column is incorrect
Similar to #1255 , 3.x metadata parsing [doesn't consider `smallint`](https://github.com/gocql/gocql/blob/b454769479c6201d26d2a2d7a29ac9a0e6fbc9fc/helpers.go#L76-L125). I'll send a PR today/tomorrow for a fix.

### What version of Cassandra are you using?

3.11.6

### What version of Gocql are you using?

cd4b606dd2fb8920e814a86b2901d062daf388a8

Pull request:
Parse smallint data type in metadata
Fixes #1430 .

Small fix and added some more coverage for `tinyint` as well.

Patch:
diff --git a/AUTHORS b/AUTHORS
index 4bf368d..e908b94 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -114,3 +114,4 @@ Martin Sucha <martin.sucha@kiwi.com>; <git@mm.ms47.eu>
 Pavel Buchinchik <p.buchinchik@gmail.com>
 Rintaro Okamura <rintaro.okamura@gmail.com>
 Yura Sokolov <y.sokolov@joom.com>; <funny.falcon@gmail.com>
+Jorge Bay <jorgebg@apache.org>
diff --git a/helpers.go b/helpers.go
index 0eb30d0..eb07f4f 100644
--- a/helpers.go
+++ b/helpers.go
@@ -85,14 +85,20 @@ func getCassandraBaseType(name string) Type {
 		return TypeBoolean
 	case "counter":
 		return TypeCounter
+	case "date":
+		return TypeDate
 	case "decimal":
 		return TypeDecimal
 	case "double":
 		return TypeDouble
+	case "duration":
+		return TypeDuration
 	case "float":
 		return TypeFloat
 	case "int":
 		return TypeInt
+	case "smallint":
+		return TypeSmallInt
 	case "tinyint":
 		return TypeTinyInt
 	case "time":


Test patch:
diff --git a/helpers_test.go b/helpers_test.go
index d5d86fb..ff057bd 100644
--- a/helpers_test.go
+++ b/helpers_test.go
@@ -171,6 +171,34 @@ func TestGetCassandraType(t *testing.T) {
 				Elem: NativeType{typ: TypeInt},
 			},
 		},
+		{
+			"set<smallint>", CollectionType{
+				NativeType: NativeType{typ: TypeSet},
+				Elem:       NativeType{typ: TypeSmallInt},
+			},
+		},
+		{
+			"list<tinyint>", CollectionType{
+				NativeType: NativeType{typ: TypeList},
+				Elem:       NativeType{typ: TypeTinyInt},
+			},
+		},
+		{"smallint", NativeType{typ: TypeSmallInt}},
+		{"tinyint", NativeType{typ: TypeTinyInt}},
+		{"duration", NativeType{typ: TypeDuration}},
+		{"date", NativeType{typ: TypeDate}},
+		{
+			"list<date>", CollectionType{
+				NativeType: NativeType{typ: TypeList},
+				Elem:       NativeType{typ: TypeDate},
+			},
+		},
+		{
+			"set<duration>", CollectionType{
+				NativeType: NativeType{typ: TypeSet},
+				Elem:       NativeType{typ: TypeDuration},
+			},
+		},
 	}
 
 	for _, test := range tests {
Repository: dbt-athena/dbt-athena (python)

Issue:
Fix num_retries
## Context
When setting up num_retries=1 the queries are not retried, because in num_retries is in max_attempt.

Fix the issue changing https://github.com/dbt-athena/dbt-athena/blob/main/dbt/adapters/athena/connections.py#L178 to
`stop=stop_after_attempt(self._retry_config.attempt + 1)`

Doing so when the user uses num_retries=0 means we issue 1 attempt,
but when passing num_retries=1, 2 attempts are issued and so on num_retries=2, means 3 total attempts and 2 retries in total.

Pull request:
fix: wrong num_retries counting the first run
Fixes #436 

# Description

<!--- Add a little description on what you plan to tackle with this PR -->
<!--- Add resolve #issue-number in case you resolve an open issue -->

## Models used to test - Optional
<!--- Add here the models that you use to test the changes -->

## Checklist

- [X] You followed [contributing section](https://github.com/dbt-athena/dbt-athena#contributing)
- [X] You kept your Pull Request small and focused on a single feature or bug fix.
- [X] You added unit testing when necessary
- [X] You added functional testing when necessary


Patch:
diff --git a/dbt/adapters/athena/connections.py b/dbt/adapters/athena/connections.py
index ce47706..d97b766 100644
--- a/dbt/adapters/athena/connections.py
+++ b/dbt/adapters/athena/connections.py
@@ -56,7 +56,7 @@ class AthenaCredentials(Credentials):
     poll_interval: float = 1.0
     debug_query_state: bool = False
     _ALIASES = {"catalog": "database"}
-    num_retries: Optional[int] = 5
+    num_retries: int = 5
     s3_data_dir: Optional[str] = None
     s3_data_naming: Optional[str] = "schema_table_unique"
     seed_s3_upload_args: Optional[Dict[str, Any]] = None
@@ -228,7 +228,7 @@ class AthenaConnectionManager(SQLConnectionManager):
                 poll_interval=creds.poll_interval,
                 session=get_boto3_session(connection),
                 retry_config=RetryConfig(
-                    attempt=creds.num_retries,
+                    attempt=creds.num_retries + 1,
                     exceptions=("ThrottlingException", "TooManyRequestsException", "InternalServerException"),
                 ),
                 config=get_boto3_config(),


Test patch:
diff --git a/tests/unit/test_adapter.py b/tests/unit/test_adapter.py
index aaef3d9..8a815b3 100644
--- a/tests/unit/test_adapter.py
+++ b/tests/unit/test_adapter.py
@@ -283,7 +283,7 @@ class TestAthenaAdapter:
         assert arguments["cursor_class"] == AthenaCursor
         assert isinstance(arguments["formatter"], AthenaParameterFormatter)
         assert arguments["poll_interval"] == 1.0
-        assert arguments["retry_config"].attempt == 5
+        assert arguments["retry_config"].attempt == 6
         assert arguments["retry_config"].exceptions == (
             "ThrottlingException",
             "TooManyRequestsException",