[CALCITE-6390] Exclude Arrow project on Windows builds

Close apache/calcite#3778
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 3a9ae23..fb932aa 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -69,9 +69,7 @@
       with:
         job-id: jdk${{ matrix.jdk }}
         remote-build-cache-proxy-enabled: false
-        # Arrow build is excluded because it is not supported on Windows
-        # See https://arrow.apache.org/docs/java/install.html#system-compatibility
-        arguments: --scan --no-parallel --no-daemon build javadoc --exclude-task :arrow:build
+        arguments: --scan --no-parallel --no-daemon build javadoc
     - name: 'sqlline and sqllsh'
       shell: cmd
       run: |
@@ -105,9 +103,7 @@
         with:
           job-id: jdk${{ matrix.jdk }}
           remote-build-cache-proxy-enabled: false
-          # Arrow build is excluded because it is not supported on Windows
-          # See https://arrow.apache.org/docs/java/install.html#system-compatibility
-          arguments: --scan --no-parallel --no-daemon build --exclude-task :arrow:build
+          arguments: --scan --no-parallel --no-daemon build
       - name: 'sqlline and sqllsh'
         shell: cmd
         run: |
diff --git a/arrow/build.gradle.kts b/arrow/build.gradle.kts
index 402ad4f..ecbe01e 100644
--- a/arrow/build.gradle.kts
+++ b/arrow/build.gradle.kts
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 import com.github.vlsi.gradle.dsl.configureEach
+import org.gradle.internal.os.OperatingSystem
 
 dependencies {
     api(project(":core"))
@@ -36,6 +37,11 @@
 plugins.withType<JavaPlugin> {
     tasks {
         configureEach<Test> {
+            // Tests disabled on Windows due to failures. Arrow is not tested on Windows:
+            // https://arrow.apache.org/docs/java/install.html#system-compatibility
+            enabled = !OperatingSystem.current().isWindows
+            // The following JVM options are required when using certain JDKs >= 9
+            // https://arrow.apache.org/docs/java/install.html#java-compatibility
             jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
             jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED")
         }