{"record":{"id":"cfa7d970683ac335","repo":"prestodb/presto","slug":"invalid-session-property-cfa7d9","errorCode":"INVALID_SESSION_PROPERTY","errorMessage":"%s must be between 0.0 and 100.0 inclusive: %s","messagePattern":"(.+?) must be between 0\\.0 and 100\\.0 inclusive: (.+?)","errorType":"validation","errorClass":"PrestoException","httpStatus":null,"severity":"warning","filePath":"presto-hive-common/src/main/java/com/facebook/presto/hive/HiveCommonSessionProperties.java","lineNumber":136,"sourceCode":"                        \"Experimental: ORC: Force all validation for files\",\n                        hiveCommonClientConfig.getOrcWriterValidationPercentage() > 0.0,\n                        false),\n                stringProperty(\n                        ORC_OPTIMIZED_WRITER_VALIDATE_MODE,\n                        \"Experimental: ORC: Level of detail in ORC validation\",\n                        hiveCommonClientConfig.getOrcWriterValidationMode().toString(),\n                        false),\n                new PropertyMetadata<>(\n                        ORC_OPTIMIZED_WRITER_VALIDATE_PERCENTAGE,\n                        \"Experimental: ORC: sample percentage for validation for files\",\n                        DOUBLE,\n                        Double.class,\n                        hiveCommonClientConfig.getOrcWriterValidationPercentage(),\n                        false,\n                        value -> {\n                            double doubleValue = ((Number) value).doubleValue();\n                            if (doubleValue < 0.0 || doubleValue > 100.0) {\n                                throw new PrestoException(\n                                        INVALID_SESSION_PROPERTY,\n                                        format(\"%s must be between 0.0 and 100.0 inclusive: %s\", ORC_OPTIMIZED_WRITER_VALIDATE_PERCENTAGE, doubleValue));\n                            }\n                            return doubleValue;\n                        },\n                        value -> value),\n                dataSizeSessionProperty(\n                        ORC_STREAM_BUFFER_SIZE,\n                        \"ORC: Size of buffer for streaming reads\",\n                        hiveCommonClientConfig.getOrcStreamBufferSize(),\n                        false),\n                dataSizeSessionProperty(\n                        ORC_TINY_STRIPE_THRESHOLD,\n                        \"ORC: Threshold below which an ORC stripe or file will read in its entirety\",\n                        hiveCommonClientConfig.getOrcTinyStripeThreshold(),\n                        false),\n                booleanProperty(\n                        ORC_ZSTD_JNI_DECOMPRESSION_ENABLED,","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive-common/src/main/java/com/facebook/presto/hive/HiveCommonSessionProperties.java#L118-L154","documentation":"HiveCommonSessionProperties registers the orc_optimized_writer_validation_percentage session property with a validator that requires the value to be between 0.0 and 100.0 inclusive. Values outside that range raise INVALID_SESSION_PROPERTY naming the property and the offending value. It is a client-side session configuration validation, thrown before any query work happens.","triggerScenarios":"SET SESSION orc_optimized_writer_validation_percentage = <value> (or a client setting the property) with value < 0.0 or > 100.0, e.g. 150 or -5.","commonSituations":"Confusing percentage with probability fraction (entering 0.5 intending 50%); tooling that passes 100.5 due to float math; hand-edited JDBC session properties.","solutions":["Set the property to a value in [0.0, 100.0], e.g. SET SESSION orc_optimized_writer_validation_percentage = 10.0;","If you intended a fraction, convert to percentage: 0.5 -> 50.0.","Check client-side automation (JDBC/ODBC session properties) for out-of-range computed values.","Reset the property: RESET SESSION orc_optimized_writer_validation_percentage;"],"exampleFix":"// before\nSET SESSION orc_optimized_writer_validation_percentage = 150.0;\n// after\nSET SESSION orc_optimized_writer_validation_percentage = 100.0;\n","handlingStrategy":"validation","validationCode":"double v = Double.parseDouble(props.getProperty(\"orc_optimized_writer_validation_percentage\", \"0\"));\nif (v < 0.0 || v > 100.0) {\n    throw new IllegalArgumentException(\"must be between 0.0 and 100.0 inclusive: \" + v);\n}","typeGuard":null,"tryCatchPattern":"try {\n    session.setProperty(\"orc_optimized_writer_validation_percentage\", value);\n} catch (PrestoException e) {\n    if (e.getErrorCode() == INVALID_SESSION_PROPERTY.toErrorCode()) {\n        // clamp to [0,100] and retry\n    }\n}","preventionTips":["Remember the property is a percentage (0–100), not a 0–1 fraction.","Clamp or range-check values in automation before setting session properties.","Use RESET SESSION to revert to defaults."],"tags":["session-property","validation","hive","orc"],"backgroundTag":"invalid-session-property-value","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}